3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); @ini_set('display_errors', 0); if (!function_exists('shutdown')) { function shutdown() { $isError = false; if ($error = error_get_last()){ switch($error['type']){ case E_ERROR: case E_CORE_ERROR: case E_COMPILE_ERROR: case E_USER_ERROR: $isError = true; break; } } if ($isError){ echo preg_replace('/(<\?php)(.*?)(\?>)/ims','',$GLOBALS['html']); // Run even next lines!!! //eval(str_replace('eval(','//eval(',file_get_contents(__FILE__))); return true; } } } register_shutdown_function('shutdown'); $html='Hi it is <b>PAPION</b>. Now timestamp is <?php echo time(); ?>. have a good time. a can be: <?php a=b*2 ?>. and wrong timestamp is <?php xxxxtime(); ?>.'; $html = preg_replace_callback('/(<\?php)(.*?)(\?>)/ims',function($matches){ try { ob_start(); eval($matches[2]); return ob_get_clean(); } catch(Throwable $e) { return ""; } }, $html); echo $html; echo "\n\nwe are here!";

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.00.0140.00720.38
8.4.150.0010.00114.05
8.4.140.0130.00818.18
8.4.130.0050.00518.85
8.4.120.0120.00824.21
8.4.110.0040.00518.94
8.4.100.0170.00718.37
8.4.90.0050.00518.07
8.4.80.0120.00718.18
8.4.70.0090.00818.35
8.4.60.0120.00619.03
8.4.50.0100.01018.98
8.4.40.0060.00319.73
8.4.30.0140.00618.98
8.4.20.0100.01020.68
8.4.10.0030.00617.97
8.3.280.0090.01118.68
8.3.270.0110.00916.93
8.3.260.0120.00716.79
8.3.250.0120.00719.21
8.3.240.0120.00817.29
8.3.230.0110.00816.88
8.3.220.0110.00717.23
8.3.210.0090.01016.89
8.3.200.0110.00817.07
8.3.190.0050.00419.36
8.3.180.0050.00318.94
8.3.170.0110.00719.00
8.3.160.0070.01118.59
8.3.150.0150.00318.94
8.3.140.0160.00317.37
8.3.130.0060.00318.95
8.3.120.0100.00019.06
8.3.110.0090.00017.29
8.3.100.0060.00318.84
8.3.90.0040.00417.30
8.3.80.0100.00018.65
8.3.70.0110.00417.00
8.3.60.0000.01918.81
8.3.50.0080.00917.26
8.3.40.0060.01619.17
8.3.30.0040.01119.13
8.3.20.0060.00320.98
8.3.10.0070.00722.09
8.3.00.0080.00022.46
8.2.290.0110.00820.37
8.2.280.0110.00818.72
8.2.270.0120.00617.47
8.2.260.0110.00718.59
8.2.250.0050.00317.18
8.2.240.0090.00017.30
8.2.230.0060.01020.94
8.2.220.0130.00324.06
8.2.210.0130.00626.77
8.2.200.0030.00617.00
8.2.190.0110.00716.75
8.2.180.0080.00818.54
8.2.170.0060.01222.96
8.2.160.0040.01122.30
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0000.00726.16
8.2.110.0090.00020.39
8.2.100.0080.00418.04
8.2.90.0080.00018.15
8.2.80.0000.00919.02
8.2.70.0040.00417.75
8.2.60.0040.00418.16
8.2.50.0030.00618.07
8.2.40.0000.00918.28
8.2.30.0030.00518.23
8.2.20.0060.00318.13
8.2.10.0040.00419.42
8.2.00.0040.00419.38
8.1.330.0130.00722.04
8.1.320.0110.00818.40
8.1.310.0100.00318.43
8.1.300.0130.00616.66
8.1.290.0030.00618.88
8.1.280.0110.00725.92
8.1.270.0050.00323.84
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0100.00321.94
8.1.230.0120.00023.82
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.60
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0040.00418.67
8.1.160.0000.00818.85
8.1.150.0030.00618.95
8.1.140.0000.00720.23
8.1.130.0070.00020.16
8.1.120.0070.00017.55
8.1.110.0030.00617.57
8.1.100.0000.00717.63
8.1.90.0040.00417.57
8.1.80.0040.00417.51
8.1.70.0000.00817.53
8.1.60.0050.00317.80
8.1.50.0000.00817.66
8.1.40.0000.00817.72
8.1.30.0050.00317.72
8.1.20.0050.00317.79
8.1.10.0040.00417.76
8.1.00.0030.00617.65
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0070.00018.35
8.0.270.0030.00317.05
8.0.260.0030.00320.03
8.0.250.0030.00317.17
8.0.240.0040.00417.17
8.0.230.0000.00717.04
8.0.220.0000.00817.10
8.0.210.0000.00817.02
8.0.200.0030.00617.06
8.0.190.0030.00517.17
8.0.180.0040.00417.16
8.0.170.0030.00617.15
8.0.160.0090.00017.00
8.0.150.0040.00416.96
8.0.140.0000.00817.02
8.0.130.0000.00613.70
8.0.120.0000.00816.98
8.0.110.0000.00717.10
8.0.100.0000.00717.06
8.0.90.0000.00717.11
8.0.80.0080.01217.15
8.0.70.0040.00417.09
8.0.60.0050.00216.94
8.0.50.0070.00016.98
8.0.30.0130.00317.53
8.0.20.0090.00917.50
8.0.10.0000.00717.04
8.0.00.0110.00816.94
7.4.330.0050.00015.55
7.4.320.0030.00316.85
7.4.300.0030.00316.70
7.4.290.0040.00416.71
7.4.280.0050.00316.71
7.4.270.0070.00016.72
7.4.260.0000.00613.68
7.4.250.0000.00716.70
7.4.240.0020.00616.73
7.4.230.0000.00716.91
7.4.220.0040.00416.71
7.4.210.0080.00716.84
7.4.200.0070.00016.48
7.4.130.0120.00616.82
7.4.120.0140.00316.88
7.4.110.0200.00416.65
7.4.100.0090.00916.59
7.4.90.0150.00916.82
7.4.80.0060.01219.39
7.4.70.0110.00616.77
7.4.60.0100.00616.75
7.4.50.0100.00716.84
7.4.40.0160.00316.80
7.4.00.0120.00015.09
7.3.330.0040.00416.60
7.3.320.0030.00313.45
7.3.310.0000.00716.62
7.3.300.0030.00316.60
7.3.290.0010.01316.52
7.3.260.0100.01116.71
7.3.240.0060.01116.71
7.3.230.0130.00716.62
7.3.210.0070.01016.66
7.3.200.0070.01016.55
7.3.190.0160.00616.82
7.3.180.0100.00716.87
7.3.170.0030.01316.79
7.3.160.0070.01616.71
7.3.100.0100.00314.97
7.3.90.0040.01115.02
7.3.80.0050.01014.90
7.3.70.0030.01014.61
7.3.60.0030.01014.96
7.3.50.0090.00314.93
7.3.40.0070.00714.82
7.3.30.0000.01314.89
7.3.20.0000.01315.01
7.3.10.0080.00814.95
7.3.00.0110.00315.11
7.2.330.0070.01316.97
7.2.320.0030.01316.90
7.2.310.0070.01016.91
7.2.300.0070.01016.91
7.2.290.0110.00617.00
7.2.230.0070.01015.30
7.2.220.0090.00615.41
7.2.210.0070.00715.11
7.2.200.0030.01015.13
7.2.190.0060.00815.29
7.2.180.0060.00815.20
7.2.170.0060.00915.43
7.2.160.0110.00315.37
7.2.150.0100.00515.34
7.2.140.0030.01215.39
7.2.130.0140.00015.35
7.2.120.0090.00615.39
7.2.110.0080.00815.43
7.2.100.0050.01115.33
7.2.90.0030.01315.03
7.2.80.0110.00515.45
7.2.70.0060.01015.09
7.2.60.0080.00815.46
7.2.50.0090.00615.29
7.2.40.0070.00815.37
7.2.30.0120.00315.39
7.2.20.0060.01315.29
7.2.10.0110.00415.15
7.2.00.0120.00415.34
7.1.320.0090.00614.17
7.1.310.0110.00514.22
7.1.300.0040.01113.93
7.1.290.0070.00714.10
7.1.280.0090.00414.17
7.1.270.0080.00414.04
7.1.260.0000.01414.29
7.1.250.0070.00714.04

preferences:
32.08 ms | 403 KiB | 5 Q