3v4l.org

run code in 300+ PHP versions simultaneously
<?php //include(__DIR__.'/inc/functions.inc.php'); if (true) { function array2string($var) { switch (($type = gettype($var))) { case 'boolean': return $var ? 'TRUE' : 'FALSE'; case 'string': return "'$var'"; case 'integer': case 'double': case 'resource': return $var; case 'NULL': return 'NULL'; case 'object': case 'array': return str_replace(array("\n",' '/*,'Array'*/),'',print_r($var,true)); } return 'UNKNOWN TYPE!'; } function lang($key,$vars=null) { if(!is_array($vars)) { $vars = func_get_args(); array_shift($vars); // remove $key } return translate($key,$vars); } function translate($key, $vars=null, $not_found='' ) { $ret = $key; if (is_array($vars) && count($vars)) { if (count($vars) > 1) { static $placeholders = array('%3','%2','%1','|%2|','|%3|','%4','%5','%6','%7','%8','%9','%10'); // to cope with $vars[0] containing '%2' (eg. an urlencoded path like a referer), // we first replace '%2' in $ret with '|%2|' and then use that as 2. placeholder // we do that for %3 as well, ... $vars = array_merge(array('|%3|','|%2|'),$vars); // push '|%2|' (and such) as first replacement on $vars $ret = str_replace($placeholders,$vars,$ret); } else { $ret = str_replace('%1',$vars[0],$ret); } } return $ret; } } $checks = array( 'allow_url_fopen' => array( 'func' => 'php_ini_check', 'value' => 1, 'verbose_value' => 'On', 'error' => lang('%1 setting "%2" = %3 disallows access via http!', 'php.ini', 'allow_url_fopen', array2string(ini_get('allow_url_fopen'))), ), ); echo "<pre>\n".print_r($checks, true)."</pre>\n"; die(array2string(ini_get('allow_url_fopen')));
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
<pre> Array ( [allow_url_fopen] => Array ( [func] => php_ini_check [value] => 1 [verbose_value] => On [error] => php.ini setting "allow_url_fopen" = '1' disallows access via http! ) ) </pre> '1'
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
189.13 ms | 407 KiB | 5 Q