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')));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.10.0120.00620.01
8.5.00.0100.01120.31
8.4.150.0030.00014.05
8.4.140.0120.00917.63
8.4.130.0100.01117.96
8.4.120.0100.01020.41
8.4.110.0090.00718.93
8.4.100.0120.00818.86
8.4.90.0080.01020.61
8.4.80.0050.00417.97
8.4.70.0110.01117.95
8.4.60.0030.00518.71
8.4.50.0040.00518.07
8.4.40.0070.01317.92
8.4.30.0050.00317.77
8.4.20.0090.00017.61
8.4.10.0090.00017.95
8.3.280.0130.00918.70
8.3.270.0100.01016.78
8.3.260.0100.00916.73
8.3.250.0140.00518.95
8.3.240.0090.00617.02
8.3.230.0080.00816.65
8.3.220.0100.00919.14
8.3.210.0070.00116.61
8.3.200.0040.00416.56
8.3.190.0050.00318.88
8.3.180.0050.00418.21
8.3.170.0180.00016.82
8.3.160.0130.00618.56
8.3.150.0060.01217.17
8.3.140.0070.00718.97
8.3.130.0060.00318.21
8.3.120.0080.00819.03
8.3.110.0060.00920.94
8.3.100.0060.00316.91
8.3.90.0030.00618.55
8.3.80.0100.00019.36
8.3.70.0100.01018.43
8.3.60.0120.00916.88
8.3.50.0090.00922.03
8.3.40.0100.00518.88
8.3.30.0040.01119.13
8.3.20.0070.00020.21
8.3.10.0040.00421.89
8.3.00.0030.00618.00
8.2.290.0140.00520.45
8.2.280.0100.00820.04
8.2.270.0150.00416.84
8.2.260.0090.00618.45
8.2.250.0090.01217.36
8.2.240.0110.00016.55
8.2.230.0040.00422.58
8.2.220.0080.00824.06
8.2.210.0050.00226.77
8.2.200.0030.00618.88
8.2.190.0140.00716.59
8.2.180.0110.00418.43
8.2.170.0110.00422.96
8.2.160.0100.00719.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0040.00718.89
8.2.110.0110.00020.99
8.2.100.0080.00317.91
8.2.90.0000.00822.18
8.2.80.0030.00617.97
8.2.70.0040.00417.93
8.2.60.0030.00518.21
8.2.50.0040.00418.10
8.2.40.0080.00019.40
8.2.30.0050.00218.23
8.2.20.0040.00417.84
8.2.10.0040.00418.07
8.2.00.0030.00617.72
8.1.330.0130.00722.20
8.1.320.0100.00916.43
8.1.310.0060.00318.73
8.1.300.0090.00616.66
8.1.290.0060.00330.84
8.1.280.0040.01125.92
8.1.270.0080.01122.02
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00723.79
8.1.230.0110.00020.92
8.1.220.0080.00017.79
8.1.210.0050.00319.04
8.1.200.0030.00617.22
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0000.00818.55
8.1.160.0000.00822.10
8.1.150.0040.00418.88
8.1.140.0000.00817.44
8.1.130.0070.00017.88
8.1.120.0040.00417.48
8.1.110.0040.00417.40
8.1.100.0000.00717.45
8.1.90.0000.00817.49
8.1.80.0000.00717.53
8.1.70.0030.00317.50
8.1.60.0000.00917.63
8.1.50.0030.00617.52
8.1.40.0030.00717.57
8.1.30.0040.00417.60
8.1.20.0000.00817.70
8.1.10.0040.00417.50
8.1.00.0080.00017.47
8.0.300.0000.00719.89
8.0.290.0000.00717.00
8.0.280.0080.00018.43
8.0.270.0000.00717.25
8.0.260.0040.00417.21
8.0.250.0040.00417.07
8.0.240.0090.00017.05
8.0.230.0000.00716.95
8.0.220.0030.00317.03
8.0.210.0040.00417.00
8.0.200.0060.00017.14
8.0.190.0040.00416.97
8.0.180.0000.00716.95
8.0.170.0030.00317.01
8.0.160.0000.00717.01
8.0.150.0040.00416.99
8.0.140.0050.00517.04
8.0.130.0050.00013.53
8.0.120.0030.00516.98
8.0.110.0040.00417.05
8.0.100.0000.00716.79
8.0.90.0000.00716.90
8.0.80.0120.00417.04
8.0.70.0070.00016.84
8.0.60.0000.00717.03
8.0.50.0000.00816.88
8.0.30.0120.00617.09
8.0.20.0090.01017.40
8.0.10.0000.00817.01
8.0.00.0120.01217.00
7.4.330.0000.00515.26
7.4.320.0030.00316.64
7.4.300.0030.00316.55
7.4.290.0040.00416.54
7.4.280.0040.00416.41
7.4.270.0030.00316.64
7.4.260.0030.00316.66
7.4.250.0050.00216.51
7.4.240.0040.00416.55
7.4.230.0030.00316.64
7.4.220.0100.00716.54
7.4.210.0150.00616.75
7.4.200.0000.00816.68
7.4.160.0120.00416.55
7.4.150.0060.01617.40
7.4.140.0170.00817.86
7.4.130.0120.00816.64
7.4.120.0090.00916.59
7.4.110.0100.00916.68
7.4.100.0140.00616.75
7.4.90.0120.00616.46
7.4.80.0120.01119.39
7.4.70.0120.00916.64
7.4.60.0060.01116.59
7.4.50.0030.00316.43
7.4.40.0040.01216.66
7.4.30.0070.01016.41
7.4.00.0120.00715.04
7.3.330.0030.00313.33
7.3.320.0050.00013.36
7.3.310.0030.00316.37
7.3.300.0040.00416.34
7.3.290.0090.00516.49
7.3.280.0080.00816.40
7.3.270.0090.01017.40
7.3.260.0070.01116.46
7.3.250.0070.01216.46
7.3.240.0140.00316.40
7.3.230.0060.01016.59
7.3.210.0090.00916.42
7.3.200.0120.01219.39
7.3.190.0110.00616.54
7.3.180.0100.00616.56
7.3.170.0070.01016.47
7.3.160.0100.00616.55
7.3.120.0130.00715.05
7.3.110.0040.01114.99
7.3.100.0070.01314.81
7.3.90.0070.00614.72
7.3.80.0030.01114.97
7.3.70.0030.00614.78
7.3.60.0060.00614.95
7.3.50.0120.00014.64
7.3.40.0070.00314.89
7.3.30.0130.00014.89
7.3.20.0070.00316.75
7.3.10.0040.01116.58
7.3.00.0060.01316.70
7.2.330.0070.01416.94
7.2.320.0140.00716.59
7.2.310.0060.01116.92
7.2.300.0000.01716.76
7.2.290.0110.00516.83
7.2.250.0120.00314.79
7.2.240.0060.01315.22
7.2.230.0070.01015.00
7.2.220.0070.00715.39
7.2.210.0100.00715.21
7.2.200.0090.00315.08
7.2.190.0070.00715.18
7.2.180.0000.01215.29
7.2.170.0060.00614.84
7.2.160.0030.01014.99
7.2.150.0000.01616.56
7.2.140.0100.00716.94
7.2.130.0030.00716.86
7.2.120.0000.01417.07
7.2.110.0090.00616.80
7.2.100.0080.00516.97
7.2.90.0080.00617.02
7.2.80.0070.00716.65
7.2.70.0030.01616.94
7.2.60.0050.01016.94
7.2.50.0060.00616.94
7.2.40.0070.00716.97
7.2.30.0080.00416.80
7.2.20.0060.00916.63
7.2.10.0030.01016.53
7.2.00.0040.00816.95
7.1.330.0110.00715.66
7.1.320.0000.01315.90
7.1.310.0090.00015.86
7.1.300.0100.00315.75
7.1.290.0040.01115.47
7.1.280.0000.01215.61
7.1.270.0070.00415.68
7.1.260.0030.01515.89
7.1.250.0060.00315.71
7.1.240.0060.00615.71
7.1.230.0110.00315.78
7.1.220.0070.00315.80
7.1.210.0070.00715.75
7.1.200.0040.01415.52
7.1.190.0100.01015.63
7.1.180.0100.01015.66
7.1.170.0130.00315.85
7.1.160.0100.00615.71
7.1.150.0040.00715.71
7.1.140.0000.01515.54
7.1.130.0070.01015.69
7.1.120.0050.00815.70
7.1.110.0000.01115.79
7.1.100.0030.00915.95
7.1.90.0040.01115.68
7.1.80.0060.00915.80
7.1.70.0040.00916.38
7.1.60.0100.00817.54
7.1.50.0020.01616.43
7.1.40.0040.00715.77
7.1.30.0030.01015.72
7.1.20.0030.01015.90
7.1.10.0000.01515.57
7.1.00.0040.04319.14
7.0.330.0030.00715.10
7.0.320.0040.00815.34
7.0.310.0080.00315.38
7.0.300.0090.00315.30
7.0.290.0030.01315.30
7.0.280.0000.00915.14
7.0.270.0030.01315.24
7.0.260.0030.00615.48
7.0.250.0000.01215.49
7.0.240.0090.00315.23
7.0.230.0040.01115.53
7.0.220.0070.01015.46
7.0.210.0090.00015.27
7.0.200.0430.00815.06
7.0.190.0090.00615.43
7.0.180.0040.01215.46
7.0.170.0030.01015.11
7.0.160.0060.00615.23
7.0.150.0030.01315.55
7.0.140.0030.02118.72
7.0.130.0070.00715.31
7.0.120.0030.01315.33
7.0.110.0060.00315.51
7.0.100.0070.00715.39
7.0.90.0030.01015.26
7.0.80.0000.01315.11
7.0.70.0070.01015.57
7.0.60.0050.02517.57
7.0.50.0100.03316.65
7.0.40.0030.04916.85
7.0.30.0190.03716.83
7.0.20.0220.04716.82
7.0.10.0110.04716.91
7.0.00.0050.04716.82
5.6.400.0070.00714.46
5.6.390.0110.00314.54
5.6.380.0060.00614.20
5.6.370.0110.00414.27
5.6.360.0030.00614.55
5.6.350.0100.00014.43
5.6.340.0000.01214.54
5.6.330.0030.00514.49
5.6.320.0040.01114.54
5.6.310.0060.00614.51
5.6.300.0090.00614.57
5.6.290.0100.00714.56
5.6.280.0090.00314.70
5.6.270.0040.00714.62
5.6.260.0090.00314.38
5.6.250.0000.00914.02
5.6.240.0030.00914.17
5.6.230.0000.01314.50
5.6.220.0040.00714.51
5.6.210.0020.05017.58
5.6.200.0030.03416.22
5.6.190.0070.04717.51
5.6.180.0140.02617.42
5.6.170.0130.04017.39
5.6.160.0050.03417.32
5.6.150.0070.03716.23
5.6.140.0030.02316.08
5.6.130.0060.02316.13
5.6.120.0030.02917.69
5.6.110.0090.02217.69
5.6.100.0080.04017.73
5.6.90.0050.02517.58
5.6.80.0100.03717.26
5.6.70.0030.00814.45
5.6.60.0090.00314.14
5.6.50.0070.00414.08
5.6.40.0000.01614.27
5.6.30.0060.01213.98
5.6.20.0030.01014.29
5.6.10.0140.00014.34
5.6.00.0030.01314.09
5.5.380.0060.00614.22
5.5.370.0030.00914.34
5.5.360.0100.00014.45
5.5.350.0160.04117.40
5.5.340.0100.02816.12
5.5.330.0060.03017.21
5.5.320.1670.02017.10
5.5.310.0160.03617.36
5.5.300.0050.04216.27
5.5.290.0000.04815.94
5.5.280.0050.04617.74
5.5.270.0070.03317.51
5.5.260.0050.03917.53
5.5.250.0080.04217.46
5.5.240.0000.02217.10
5.5.230.0100.00314.32
5.5.220.0040.00714.31
5.5.210.0070.01014.31
5.5.200.0030.00914.27
5.5.190.0030.01414.18
5.5.180.0000.01414.32
5.5.170.0030.01014.27
5.5.160.0000.01514.37
5.5.150.0070.00713.82
5.5.140.0070.00314.04
5.5.130.0030.00714.25
5.5.120.0060.00914.10
5.5.110.0030.00914.00
5.5.100.0070.00614.36
5.5.90.0100.00314.03
5.5.80.0060.00614.00
5.5.70.0000.01314.11
5.5.60.0070.00414.25
5.5.50.0000.01414.06
5.5.40.0090.00314.08
5.5.30.0100.00313.79
5.5.20.0070.00714.39
5.5.10.0070.00714.03
5.5.00.0000.01314.44
5.4.450.0320.02715.53
5.4.440.0120.02815.47
5.4.430.0090.02815.30
5.4.420.0110.02615.17
5.4.410.0070.03015.24
5.4.400.0070.02715.30
5.4.390.0100.02515.14
5.4.380.0200.03014.98
5.4.370.0130.02514.73
5.4.360.0150.02615.00
5.4.350.0150.02214.87
5.4.340.0160.01714.77
5.4.330.0000.00711.09
5.4.320.0030.03214.75
5.4.310.0070.03714.70
5.4.300.0100.03014.84
5.4.290.0080.03114.91
5.4.280.0120.02614.71
5.4.270.0050.02414.66
5.4.260.0160.01714.79
5.4.250.0010.03114.61
5.4.240.0050.02514.74
5.4.230.0080.02214.82
5.4.220.0050.02514.74
5.4.210.0070.02114.89
5.4.200.0030.02913.84
5.4.190.0090.02414.91
5.4.180.0080.02314.66
5.4.170.0030.02814.78
5.4.160.0080.02214.71
5.4.150.0120.01914.75
5.4.140.0070.02713.62
5.4.130.0130.01813.60
5.4.120.0060.02313.60
5.4.110.0080.02113.62
5.4.100.0030.02613.55
5.4.90.0060.02313.54
5.4.80.0090.02113.67
5.4.70.0110.02213.42
5.4.60.0080.02313.63
5.4.50.0100.02013.64
5.4.40.0070.02513.56
5.4.30.0060.02113.62
5.4.20.0100.02313.70
5.4.10.0040.02713.64
5.4.00.0070.02313.36
5.3.290.0000.05014.67
5.3.280.0070.04314.65
5.3.270.0170.04014.55
5.3.260.0170.03314.54
5.3.250.0100.03714.65
5.3.240.0100.03714.57
5.3.230.0070.04014.76
5.3.220.0130.04314.52
5.3.210.0130.04014.70
5.3.200.0170.04714.54
5.3.190.0200.03014.52
5.3.180.0100.04314.53
5.3.170.0130.04314.55
5.3.160.0070.04014.61
5.3.150.0070.04314.69
5.3.140.0100.04014.52
5.3.130.0170.03314.54
5.3.120.0200.04714.59
5.3.110.0070.04714.58
5.3.100.0170.03714.08
5.3.90.0100.03714.19
5.3.80.0200.02714.00
5.3.70.0070.04014.06
5.3.60.0030.04314.14
5.3.50.0000.05013.95
5.3.40.0200.04313.90
5.3.30.0070.04013.88
5.3.20.0130.03313.80
5.3.10.0130.03713.62
5.3.00.0030.04713.76
5.2.170.0100.03011.10
5.2.160.0030.03311.16
5.2.150.0130.02711.16
5.2.140.0170.02311.11
5.2.130.0100.03011.23
5.2.120.0030.03311.23
5.2.110.0100.03011.11
5.2.100.0100.03311.25
5.2.90.0100.03011.16
5.2.80.0070.03311.15
5.2.70.0070.03011.13
5.2.60.0070.03711.03
5.2.50.0100.03310.96
5.2.40.0070.04310.91
5.2.30.0100.04011.01
5.2.20.0030.03310.97
5.2.10.0100.02710.92
5.2.00.0000.03710.66
5.1.60.0070.0239.99
5.1.50.0000.03010.05
5.1.40.0070.02710.11
5.1.30.0100.03010.38
5.1.20.0100.03710.41
5.1.10.0070.03010.20
5.1.00.0070.02710.19
5.0.50.0100.0208.55
5.0.40.0100.0208.54
5.0.30.0100.0308.41
5.0.20.0100.0238.25
5.0.10.0130.0178.21
5.0.00.0030.0408.18
4.4.90.0000.0235.91
4.4.80.0030.0205.85
4.4.70.0070.0175.91
4.4.60.0030.0175.88
4.4.50.0100.0175.95
4.4.40.0100.0205.91
4.4.30.0100.0105.84
4.4.20.0030.0205.92
4.4.10.0030.0175.95
4.4.00.0000.0275.88
4.3.110.0070.0175.80
4.3.100.0000.0205.77
4.3.90.0030.0135.75
4.3.80.0000.0305.80
4.3.70.0030.0175.84
4.3.60.0030.0175.79
4.3.50.0000.0205.80
4.3.40.0030.0275.73
4.3.30.0000.0204.58
4.3.20.0000.0204.51
4.3.10.0000.0204.49
4.3.00.0000.0237.07

preferences:
43.62 ms | 403 KiB | 5 Q