3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = 5; $a = $value; $closure = function () use ($a) { if (($a << 2) === 0) { throw new \InvalidArgumentException('Not valid number'); } if ($a > 5) { return false; } else { return [ 'a' => 5, 'b' => 10, 'c' => 400000 ]; } } echo count($closure());

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.0270.04318.90
5.4.260.0130.05318.79
5.4.250.0070.08318.74
5.4.240.0030.06318.90
5.4.230.0100.05718.84
5.4.220.0200.07019.09
5.4.210.0230.06018.76
5.4.200.0230.04719.02
5.4.190.0070.05319.02
5.4.180.0130.06719.06
5.4.170.0100.06718.94
5.4.160.0270.05018.73
5.4.150.0230.04318.78
5.4.140.0070.06016.40
5.4.130.0070.05016.31
5.4.120.0030.05716.49
5.4.110.0070.06316.32
5.4.100.0030.05316.45
5.4.90.0130.06716.40
5.4.80.0030.05316.46
5.4.70.0130.07016.39
5.4.60.0130.05316.36
5.4.50.0130.04316.36
5.4.40.0100.04716.52
5.4.30.0130.06016.49
5.4.20.0070.06016.35
5.4.10.0030.07716.38
5.4.00.0170.05315.93
5.3.280.0100.06714.68
5.3.270.0100.08314.51
5.3.260.0130.05314.82
5.3.250.0130.05714.69
5.3.240.0130.05314.67
5.3.230.0100.06314.68
5.3.220.0030.06014.39
5.3.210.0170.04714.65
5.3.200.0200.06314.56
5.3.190.0030.07714.74
5.3.180.0130.06014.55
5.3.170.0170.05014.46
5.3.160.0130.06014.63
5.3.150.0030.05314.59
5.3.140.0100.07714.60
5.3.130.0130.05014.77
5.3.120.0070.08314.53
5.3.110.0130.05714.68
5.3.100.0030.07314.10
5.3.90.0030.05714.00
5.3.80.0170.06014.00
5.3.70.0100.06313.87
5.3.60.0100.07014.16
5.3.50.0070.06713.86
5.3.40.0070.07313.95
5.3.30.0130.05713.97
5.3.20.0100.06013.92
5.3.10.0100.04313.64
5.3.00.0130.05713.72
5.2.170.0200.03011.25
5.2.160.0070.04711.16
5.2.150.0070.06010.98
5.2.140.0000.04711.07
5.2.130.0130.04311.10
5.2.120.0000.04711.11
5.2.110.0030.05710.98
5.2.100.0070.04311.11
5.2.90.0030.04310.86
5.2.80.0070.05010.97
5.2.70.0070.05711.09
5.2.60.0070.04311.20
5.2.50.0130.04010.92
5.2.40.0030.04310.91
5.2.30.0070.04710.86
5.2.20.0030.04310.98
5.2.10.0130.04310.78
5.2.00.0000.04710.80
5.1.60.0030.04710.05
5.1.50.0000.0509.88
5.1.40.0070.03710.13
5.1.30.0070.05310.49
5.1.20.0000.06010.11
5.1.10.0030.0379.98
5.1.00.0030.04310.30
5.0.50.0030.0278.40
5.0.40.0030.0278.45
5.0.30.0070.0438.13
5.0.20.0000.0338.34
5.0.10.0070.0338.23
5.0.00.0000.0478.13
4.4.90.0070.0206.40
4.4.80.0070.0206.40
4.4.70.0100.0206.40
4.4.60.0070.0276.40
4.4.50.0070.0276.40
4.4.40.0000.0406.40
4.4.30.0030.0236.40
4.4.20.0130.0206.40
4.4.10.0030.0306.40
4.4.00.0070.0306.40
4.3.110.0030.0306.40
4.3.100.0030.0306.40
4.3.90.0030.0276.40
4.3.80.0070.0336.40
4.3.70.0000.0236.40
4.3.60.0030.0236.40
4.3.50.0030.0306.40
4.3.40.0000.0476.40
4.3.30.0000.0236.40
4.3.20.0070.0276.40
4.3.10.0000.0236.40
4.3.00.0070.0277.01

preferences:
140.62 ms | 1394 KiB | 7 Q