3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $value = 1; public function getClosure() { return function() use ($x = $this) { return $x->value; }; } } $a = new A; $fn = $a->getClosure(); echo $fn(); // 1

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.350.0300.04319.09
5.4.340.0300.03319.08
5.4.320.0270.07319.16
5.4.310.0300.03019.15
5.4.300.0300.02718.99
5.4.290.0200.04019.24
5.4.280.0300.06019.33
5.4.270.0300.04319.06
5.4.260.0270.04318.85
5.4.250.0270.03719.24
5.4.240.0430.06019.10
5.4.230.0300.04018.99
5.4.220.0300.03319.02
5.4.210.0230.04019.15
5.4.200.0330.06719.10
5.4.190.0370.04018.86
5.4.180.0270.05018.86
5.4.170.0370.05719.05
5.4.160.0400.05019.18
5.4.150.0230.05319.13
5.4.140.0230.07316.43
5.4.130.0300.06716.40
5.4.120.0230.07316.55
5.4.110.0300.03716.50
5.4.100.0300.03016.24
5.4.90.0470.02316.40
5.4.80.0200.05016.59
5.4.70.0200.04016.58
5.4.60.0200.04316.51
5.4.50.0230.03016.53
5.4.40.0230.03016.16
5.4.30.0270.04716.44
5.4.20.0100.04316.42
5.4.10.0200.03716.37
5.4.00.0170.03716.01
5.3.290.0200.04014.71
5.3.280.0370.07014.71
5.3.270.0470.05314.52
5.3.260.0270.05714.69
5.3.250.0530.02014.73
5.3.240.0300.06714.58
5.3.230.0330.06714.59
5.3.220.0300.04714.59
5.3.210.0300.05314.57
5.3.200.0330.05014.65
5.3.190.0300.03714.68
5.3.180.0330.04014.57
5.3.170.0230.04014.72
5.3.160.0170.04014.79
5.3.150.0130.04714.59
5.3.140.0170.03714.55
5.3.130.0200.03314.63
5.3.120.0300.02714.77
5.3.110.0230.04014.48
5.3.100.0170.03714.12
5.3.90.0130.04014.24
5.3.80.0130.04313.94
5.3.70.0170.04014.00
5.3.60.0200.03713.91
5.3.50.0270.03013.87
5.3.40.0270.03713.96
5.3.30.0230.03013.84
5.3.20.0130.04013.78
5.3.10.0230.03713.81
5.3.00.0200.03313.70
5.2.170.0170.03011.72
5.2.160.0170.02711.72
5.2.150.0200.02711.72
5.2.140.0130.03011.72
5.2.130.0100.03311.72
5.2.120.0200.02311.72
5.2.110.0200.02711.72
5.2.100.0200.02311.72
5.2.90.0130.03011.72
5.2.80.0230.02011.72
5.2.70.0130.03011.72
5.2.60.0200.02311.72
5.2.50.0130.03011.72
5.2.40.0130.02711.72
5.2.30.0170.02711.72
5.2.20.0130.03011.72
5.2.10.0100.03011.72
5.2.00.0200.02311.72
5.1.60.0170.02011.72
5.1.50.0130.03011.72
5.1.40.0100.03011.72
5.1.30.0200.02011.72
5.1.20.0130.02311.72
5.1.10.0130.02711.72
5.1.00.0170.04311.72
5.0.50.0070.03011.72
5.0.40.0170.02011.72
5.0.30.0100.04011.72
5.0.20.0130.04011.72
5.0.10.0130.03011.72
5.0.00.0100.04311.72
4.4.90.0070.01311.72
4.4.80.0070.01311.72
4.4.70.0100.01311.72
4.4.60.0100.01011.72
4.4.50.0000.02011.72
4.4.40.0130.01711.72
4.4.30.0070.01711.72
4.4.20.0030.01711.72
4.4.10.0070.02311.72
4.4.00.0100.06311.72
4.3.110.0100.03311.72
4.3.100.0130.03311.72
4.3.90.0100.02711.72
4.3.80.0100.03711.72
4.3.70.0100.01311.72
4.3.60.0100.02011.72
4.3.50.0100.03711.72
4.3.40.0100.05311.72
4.3.30.0030.03311.72
4.3.20.0070.03711.72
4.3.10.0100.03311.72
4.3.00.0030.03311.72

preferences:
145.61 ms | 1394 KiB | 7 Q