3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cm404 { public $str = ''; function init() { if (isset($GLOBALS['ryat'])) { exit('hi'); } unset($GLOBALS['hi']); } function __destruct() { global $obj; var_dump($obj); if(!is_object($obj)) { $obj = new cm404(); } echo "hi, $GLOBALS[hi]\n"; var_dump($obj); } } function _get() { // var_dump($obj); } //$ryat = 1; $hi = 'ryat'; $obj = new cm404(); $obj->init(); $hi = 'cm404'; register_shutdown_function(phpinfo()); new class;

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)
5.4.270.0170.04318.77
5.4.260.0130.04718.96
5.4.250.0130.05018.91
5.4.240.0070.05018.62
5.4.230.0100.05318.80
5.4.220.0100.05318.89
5.4.210.0130.05718.92
5.4.200.0070.05018.96
5.4.190.0070.05318.68
5.4.180.0130.04318.76
5.4.170.0070.05718.95
5.4.160.0100.07318.96
5.4.150.0130.05018.74
5.4.140.0130.07316.44
5.4.130.0170.04016.60
5.4.120.0100.05016.62
5.4.110.0070.05016.42
5.4.100.0030.05316.43
5.4.90.0000.07016.53
5.4.80.0070.04716.33
5.4.70.0030.05016.37
5.4.60.0070.04716.48
5.4.50.0070.05016.45
5.4.40.0130.04716.32
5.4.30.0070.05016.54
5.4.20.0130.06316.45
5.4.10.0100.05016.27
5.4.00.0030.07016.00
5.3.280.0070.05014.78
5.3.270.0170.05314.84
5.3.260.0030.05314.68
5.3.250.0130.06314.53
5.3.240.0070.07014.75
5.3.230.0070.05014.44
5.3.220.0100.04714.59
5.3.210.0030.05714.56
5.3.200.0070.05014.65
5.3.190.0200.04014.66
5.3.180.0070.05014.58
5.3.170.0070.05014.65
5.3.160.0030.05314.56
5.3.150.0130.05714.58
5.3.140.0100.05014.54
5.3.130.0130.07014.46
5.3.120.0070.05314.74
5.3.110.0100.05014.56
5.3.100.0070.05314.12
5.3.90.0070.05014.16
5.3.80.0100.06714.11
5.3.70.0030.05314.11
5.3.60.0070.04714.09
5.3.50.0070.04714.03
5.3.40.0030.06314.12
5.3.30.0130.04013.75
5.3.20.0100.04713.79
5.3.10.0100.06313.82
5.3.00.0130.04713.82
5.2.170.0100.04711.15
5.2.160.0030.04011.14
5.2.150.0100.03711.22
5.2.140.0070.04311.23
5.2.130.0100.03311.20
5.2.120.0030.04011.20
5.2.110.0130.03011.29
5.2.100.0070.03711.18
5.2.90.0030.04011.19
5.2.80.0030.04011.19
5.2.70.0030.05011.07
5.2.60.0030.04011.05
5.2.50.0030.05011.10
5.2.40.0130.03311.01
5.2.30.0070.03711.04
5.2.20.0100.03310.93
5.2.10.0000.04310.95
5.2.00.0030.04010.74
5.1.60.0000.0379.93
5.1.50.0000.04010.16
5.1.40.0100.03010.08
5.1.30.0070.03310.17
5.1.20.0100.04710.20
5.1.10.0070.03310.12
5.1.00.0070.03310.23
5.0.50.0030.0308.65
5.0.40.0070.0378.39
5.0.30.0030.0578.33
5.0.20.0030.0378.25
5.0.10.0000.0408.02
5.0.00.0070.0408.36
4.4.90.0070.0177.53
4.4.80.0030.0207.53
4.4.70.0070.0207.53
4.4.60.0030.0207.53
4.4.50.0000.0237.53
4.4.40.0070.0307.53
4.4.30.0030.0207.53
4.4.20.0030.0237.53
4.4.10.0070.0237.53
4.4.00.0000.0407.53
4.3.110.0070.0207.53
4.3.100.0070.0207.53
4.3.90.0030.0207.53
4.3.80.0000.0337.53
4.3.70.0000.0237.53
4.3.60.0000.0237.53
4.3.50.0000.0237.53
4.3.40.0030.0337.53
4.3.30.0000.0337.53
4.3.20.0000.0237.53
4.3.10.0030.0207.53
4.3.00.0130.0207.07

preferences:
138.69 ms | 1394 KiB | 7 Q