Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Gets the current PHP version
<?php phpversion(?string $extension = null): string|false
<?php static::addToSection('Environment', fn () => [
'Application Name' => config('app.name'),
'Laravel Version' => $this->laravel->version(),
'PHP Version' => phpversion(),
'Composer Version' => $this->composer->getVersion() ?? '<fg=yellow;options=bold>-</>',
'Environment' => $this->laravel->environment(),
'Debug Mode' => static::format(config('app.debug'), console: $formatEnabledStatus),
<?php protected function phpRedisVersionAtLeast(string $version): bool
{
$phpredisVersion = phpversion('redis');
return $phpredisVersion !== false && version_compare($phpredisVersion, $version, '>=');
}
<?php Arr::get($config, 'retry_interval', 0),
];
if (version_compare(phpversion('redis'), '3.1.3', '>=')) {
$parameters[] = Arr::get($config, 'read_timeout', 0.0);
}
<?php $parameters[] = Arr::get($config, 'read_timeout', 0.0);
}
if (version_compare(phpversion('redis'), '5.3.0', '>=') && ! is_null($context = Arr::get($config, 'context'))) {
$parameters[] = $context;
}
<?php isset($options['persistent']) && $options['persistent'],
];
if (version_compare(phpversion('redis'), '4.3.0', '>=')) {
$parameters[] = $options['password'] ?? null;
}
<?php $parameters[] = $options['password'] ?? null;
}
if (version_compare(phpversion('redis'), '5.3.2', '>=') && ! is_null($context = Arr::get($options, 'context'))) {
$parameters[] = $context;
}
<?php PHP version: %s
Operating system: %s
EOF
, $message, phpversion(), PHP_OS), 1, $exception);
}
<?php return true;
}
if (! version_compare((string) phpversion('xdebug'), '3.1', '>=')) {
return true;
}
<?php 'laravel_version' => app()->version(),
'laravel_locale' => app()->getLocale(),
'laravel_config_cached' => app()->configurationIsCached(),
'php_version' => phpversion(),
]);
return $next($report);
<?php {
$this->line(sprintf('<info>Statamic</info> %s %s', Statamic::version(), Statamic::pro() ? 'Pro' : 'Solo'));
$this->line('<info>Laravel</info> '.Application::VERSION);
$this->line('<info>PHP</info> '.phpversion());
$this->addons();
}
<?php return ($phpcsFile->numTokens + 1);
}
$phpVersion = \phpversion();
if (\version_compare($phpVersion, self::MIN_RECOMMENDED_VERSION, '>=')) {
<?php $this->sniffResult = $this->sniffFile(__FILE__);
$this->phpVersion = \phpversion();
}
<?php if (\extension_loaded('xdebug') && \version_compare(\phpversion('xdebug'), '3', '>=')) {
if (defined('XDEBUG_CC_UNUSED') === false) {
define('XDEBUG_CC_UNUSED', null);
}
<?php if (PlatformRepository::isPlatformPackage($packageName)) {
if (0 === stripos($packageName, 'php') || $packageName === 'hhvm') {
$version = self::getPlatformPackageVersion($pool, $packageName, phpversion());
$msg = "- Root composer.json requires ".$packageName.self::constraintToText($constraint).' but ';
<?php $ext = substr($packageName, 4);
$msg = "- Root composer.json requires PHP extension ".$packageName.self::constraintToText($constraint).' but ';
$version = self::getPlatformPackageVersion($pool, $packageName, phpversion($ext) ?: '0');
if (null === $version) {
if (extension_loaded($ext)) {
return array(