3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_GET = array('GLOBALS'=>'1', 'shutdown_functions'=>array('function'=>'phpinfo', 'arguments'=>'1')); class Core { function __construct() { $protected = array("_GET", "_POST", "_SERVER", "_COOKIE", "_FILES", "_ENV", "GLOBALS"); foreach($protected as $var) { if(isset($_REQUEST[$var]) || isset($_FILES[$var])) { exit("Hacking attempt"); } } if(@ini_get("register_globals") == 1) { $this->unset_globals($_POST); $this->unset_globals($_GET); $this->unset_globals($_FILES); $this->unset_globals($_COOKIE); } } function unset_globals($array) { if(!is_array($array)) { return; } foreach(array_keys($array) as $key) { unset($GLOBALS[$key]); } } function __destruct() { global $shutdown_functions, $core; if (!is_object($core)) echo 'fuck'; return; if($shutdown_functions && is_array($shutdown_functions)) { call_user_func($shutdown_functions['function'], $shutdown_functions['arguments']); } else { echo 'haha'; } } } $core = new Core; $shutdown_functions = array(); ?>

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.3.70.0120.00316.75
8.3.60.0120.00316.38
8.3.50.0090.00921.98
8.3.40.0090.00918.82
8.3.30.0120.00318.85
8.3.20.0130.00620.06
8.3.10.0000.00721.85
8.3.00.0080.00019.38
8.2.190.0110.00716.58
8.2.180.0040.01116.88
8.2.170.0140.00322.96
8.2.160.0070.00720.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00419.23
8.2.120.0040.00426.35
8.2.110.0060.00320.47
8.2.100.0070.00417.93
8.2.90.0000.00819.26
8.2.80.0000.01117.97
8.2.70.0080.00017.74
8.2.60.0050.00317.91
8.2.50.0040.00418.07
8.2.40.0050.00319.52
8.2.30.0030.00320.67
8.2.20.0060.00317.85
8.2.10.0000.00918.27
8.2.00.0050.00218.04
8.1.280.0210.00025.92
8.1.270.0050.00323.87
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0080.00024.00
8.1.230.0030.00917.76
8.1.220.0050.00317.79
8.1.210.0030.00618.77
8.1.200.0000.00917.48
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0060.00318.77
8.1.160.0050.00222.02
8.1.150.0000.00718.93
8.1.140.0040.00419.65
8.1.130.0000.00717.66
8.1.120.0000.00717.41
8.1.110.0050.00317.52
8.1.100.0000.00817.54
8.1.90.0000.00717.53
8.1.80.0050.00317.40
8.1.70.0030.00317.46
8.1.60.0050.00317.65
8.1.50.0030.00517.47
8.1.40.0060.00317.56
8.1.30.0080.00017.68
8.1.20.0070.00017.72
8.1.10.0020.00517.53
8.1.00.0080.00017.62
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0070.00018.40
8.0.270.0000.00817.30
8.0.260.0000.01017.26
8.0.250.0030.00316.98
8.0.240.0070.00016.94
8.0.230.0070.00017.00
8.0.220.0000.00816.95
8.0.210.0090.00016.81
8.0.200.0000.00716.89
8.0.190.0030.00517.00
8.0.180.0070.00016.94
8.0.170.0080.00016.85
8.0.160.0050.00316.91
8.0.150.0030.00616.90
8.0.140.0030.00316.93
8.0.130.0000.00713.32
8.0.120.0000.00816.85
8.0.110.0020.00516.92
8.0.100.0000.00716.96
8.0.90.0000.00816.77
8.0.80.0130.00317.00
8.0.70.0040.00416.82
8.0.60.0080.00016.85
8.0.50.0040.00416.98
8.0.30.0100.01017.17
8.0.20.0110.00817.40
8.0.10.0050.00317.12
8.0.00.0070.01116.73
7.4.330.0050.00016.81
7.4.320.0030.00316.63
7.4.300.0030.00316.56
7.4.290.0040.00416.64
7.4.280.0040.00416.45
7.4.270.0060.00016.68
7.4.260.0070.00016.48
7.4.250.0000.00716.54
7.4.240.0020.00516.50
7.4.230.0030.00316.65
7.4.220.0150.00416.68
7.4.210.0070.00716.55
7.4.200.0000.00716.35
7.4.160.0100.00716.72
7.4.150.0070.01117.40
7.4.140.0080.01817.86
7.4.130.0120.00916.57
7.4.120.0090.00916.53
7.4.110.0100.01016.60
7.4.100.0140.00316.50
7.4.90.0140.00416.59
7.4.80.0100.01119.39
7.4.70.0070.01016.47
7.4.60.0100.00716.43
7.4.50.0030.01016.48
7.4.40.0070.01016.50
7.4.30.0070.01016.48
7.4.00.0000.01615.05
7.3.330.0040.00413.42
7.3.320.0080.00013.35
7.3.310.0030.00316.40
7.3.300.0070.00016.23
7.3.290.0090.00616.35
7.3.280.0080.01116.30
7.3.270.0100.01017.40
7.3.260.0070.01416.70
7.3.250.0110.00816.47
7.3.240.0110.00916.43
7.3.230.0070.01016.39
7.3.210.0040.01516.32
7.3.200.0130.00316.42
7.3.190.0100.01316.39
7.3.180.0110.00716.65
7.3.170.0100.00616.32
7.3.160.0080.00816.37
7.2.330.0120.00616.84
7.2.320.0120.01116.72
7.2.310.0110.00816.64
7.2.300.0060.01116.65
7.2.290.0120.00916.42
7.2.60.0040.00716.99
7.2.00.0070.00719.52
7.1.200.0000.01015.71
7.1.100.0040.00718.00
7.1.70.0000.00816.85
7.1.60.0130.01019.36
7.1.50.0070.01717.01
7.1.00.0070.07322.42
7.0.200.0080.00316.88
7.0.60.0130.08019.83
7.0.50.0130.04717.88
7.0.40.0100.05020.32
7.0.30.0300.05020.33
7.0.20.0430.06020.30
7.0.10.0030.06320.12
7.0.00.0130.05320.11
5.6.280.0000.03721.08
5.6.210.0130.07320.48
5.6.200.0070.08018.16
5.6.190.0100.04720.48
5.6.180.0330.04320.52
5.6.170.0400.08020.44
5.6.160.0030.07720.71
5.6.150.0070.07718.18
5.6.140.0070.07018.28
5.6.130.0000.07318.18
5.6.120.0070.08021.15
5.6.110.0070.04020.90
5.6.100.0030.04321.00
5.6.90.0130.07320.97
5.6.80.0070.03720.43
5.5.350.4300.04020.45
5.5.340.0030.05717.96
5.5.330.0130.07320.47
5.5.320.0030.06320.30
5.5.310.0270.04020.19
5.5.300.0100.05717.93
5.5.290.0130.07317.93
5.5.280.0100.04320.80
5.5.270.0100.08720.80
5.5.260.0030.04020.78
5.5.250.0100.08720.70
5.5.240.0230.07720.27
5.4.450.0670.04319.40
5.4.440.0570.06319.30
5.4.430.0470.05019.61
5.4.420.0470.05019.48
5.4.410.0530.04019.18
5.4.400.0430.05318.98
5.4.390.0530.05019.16
5.4.380.0600.05319.29
5.4.370.0570.05018.85
5.4.360.0670.04319.15
5.4.350.0730.05319.38
5.4.340.0770.05018.85
5.4.320.0770.05019.05
5.4.310.0700.04719.17
5.4.300.0630.04719.38
5.4.290.0100.05018.98
5.4.280.0630.05719.28
5.4.270.0600.05719.37
5.4.260.0700.05019.16
5.4.250.0470.05319.05
5.4.240.0170.06719.27
5.4.230.0500.06319.14
5.4.220.0970.05019.13
5.4.210.0330.05319.00
5.4.200.0900.04319.25
5.4.190.0700.05719.27
5.4.180.0070.05719.11
5.4.170.0730.04319.09
5.4.160.0730.06019.14
5.4.150.0730.05319.18
5.4.140.0700.04016.59
5.4.130.0070.05716.44
5.4.120.0500.05316.53
5.4.110.0700.05716.43
5.4.100.0570.05316.57
5.4.90.0600.05016.50
5.4.80.0500.05316.50
5.4.70.0630.05316.63
5.4.60.0700.05016.43
5.4.50.0670.05016.57
5.4.40.0470.06016.63
5.4.30.0600.04016.57
5.4.20.0500.04716.57
5.4.10.0500.05316.62
5.4.00.0530.05315.99
5.3.290.0730.05314.61
5.3.280.0900.04714.69
5.3.270.0700.06014.63
5.3.260.0670.05714.59
5.3.250.0700.04314.53
5.3.240.0230.04714.61
5.3.230.0700.05314.66
5.3.220.0530.06314.59
5.3.210.0730.04314.49
5.3.200.0830.06014.48
5.3.190.0600.05714.57
5.3.180.0670.05314.50
5.3.170.0730.04314.49
5.3.160.0830.06314.56
5.3.150.0870.05714.58
5.3.140.0570.05314.43
5.3.130.0730.05014.58
5.3.120.0570.06014.57
5.3.110.0500.05314.47
5.3.100.0530.05014.27
5.3.90.0530.05714.04
5.3.80.0870.05013.94
5.3.70.0570.05014.05
5.3.60.0600.05714.03
5.3.50.0630.05313.87
5.3.40.0800.04713.99
5.3.30.0630.05313.82
5.3.20.0500.06013.75
5.3.10.0470.04713.60
5.3.00.0630.06313.88
5.2.170.0600.04311.11
5.2.160.0600.03311.07
5.2.150.0600.04311.07
5.2.140.0370.04711.02
5.2.130.0500.04011.16
5.2.120.0600.04311.02
5.2.110.0530.04011.18
5.2.100.0700.03311.13
5.2.90.0500.05711.03
5.2.80.0370.04711.01
5.2.70.0570.04011.02
5.2.60.0670.04011.28
5.2.50.0430.04711.12
5.2.40.0500.04011.23
5.2.30.0270.04010.98
5.2.20.0470.03710.83
5.2.10.0570.03010.96
5.2.00.0400.04310.76
5.1.60.0470.0309.91
5.1.50.0400.0379.94
5.1.40.0430.03710.04
5.1.30.0430.04310.25
5.1.20.0470.03310.33
5.1.10.0630.03010.07
5.1.00.0600.0479.98
5.0.50.0230.0308.49
5.0.40.0200.0278.40
5.0.30.0300.0378.16
5.0.20.0200.0308.11
5.0.10.0200.0308.16
5.0.00.0130.0578.08
4.4.90.0230.0136.54
4.4.80.0370.0176.54
4.4.70.0130.0236.54
4.4.60.0230.0176.54
4.4.50.0100.0276.54
4.4.40.0270.0306.54
4.4.30.0270.0236.54
4.4.20.0300.0236.54
4.4.10.0270.0236.54
4.4.00.0100.0436.54
4.3.110.0300.0176.54
4.3.100.0200.0236.54
4.3.90.0270.0206.54
4.3.80.0200.0376.54
4.3.70.0130.0236.54
4.3.60.0230.0176.54
4.3.50.0230.0206.54
4.3.40.0300.0306.54
4.3.30.0230.0176.54
4.3.20.0130.0236.54
4.3.10.0070.0236.54
4.3.00.0200.0176.54

preferences:
64.6 ms | 401 KiB | 5 Q