3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testVar = 'foo'; // list of keys to ignore (including the name of this variable) $ignore = array('GLOBALS', '_FILES', '_COOKIE', '_POST', '_GET', '_SERVER', '_ENV', 'ignore'); // diff the ignore list as keys after merging any missing ones with the defined list $vars = array_diff_key(get_defined_vars() + array_flip($ignore), array_flip($ignore)); // should be left with the user defined var(s) (in this case $testVar) var_dump($vars); // Result: array(1) { ["testVar"]=>string(3) "foo" }

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.290.0080.03712.50
5.4.280.0080.04012.39
5.4.270.0120.03512.39
5.4.260.0090.04012.39
5.4.250.0080.04612.39
5.4.240.0060.03812.39
5.4.230.0030.04412.38
5.4.220.0060.03812.38
5.4.210.0080.03412.38
5.4.200.0070.03712.39
5.4.190.0050.03712.38
5.4.180.0050.04112.38
5.4.170.0090.04912.39
5.4.160.0060.04512.39
5.4.150.0070.03612.38
5.4.140.0080.03812.07
5.4.130.0180.02712.05
5.4.120.0070.03812.02
5.4.110.0110.03412.01
5.4.100.0060.03712.01
5.4.90.0100.03812.01
5.4.80.0090.03712.01
5.4.70.0060.03912.01
5.4.60.0100.03612.01
5.4.50.0080.03512.00
5.4.40.0090.04412.00
5.4.30.0070.04412.00
5.4.20.0100.04911.99
5.4.10.0100.03711.99
5.4.00.0090.04211.49
5.3.280.0090.04212.71
5.3.270.0090.04212.73
5.3.260.0080.04112.72
5.3.250.0060.03912.72
5.3.240.0050.04212.72
5.3.230.0180.04112.71
5.3.220.0130.04812.68
5.3.210.0080.05312.68
5.3.200.0160.04412.68
5.3.190.0120.04912.68
5.3.180.0090.05012.67
5.3.170.0120.04912.67
5.3.160.0140.04512.67
5.3.150.0180.04412.67
5.3.140.0080.05112.66
5.3.130.0100.04512.66
5.3.120.0080.04212.66
5.3.110.0090.05312.66
5.3.100.0050.04212.12
5.3.90.0110.04912.08
5.3.80.0080.05112.07
5.3.70.0100.05012.07
5.3.60.0080.05012.07
5.3.50.0060.05112.00
5.3.40.0090.04812.00
5.3.30.0120.04811.95
5.3.20.0070.04011.73
5.3.10.0080.03411.70
5.3.00.0100.04911.68

preferences:
178.67 ms | 1394 KiB | 7 Q