3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { protected $test = '1'; public function __construct(){ $a = function(){ var_dump($this); }; $a(); } public function xx(callback){ callback(); } } $a = new X(); $a->xx(function(){ var_dump($this); });

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.6.120.0130.06721.12
5.6.110.0000.04320.99
5.6.100.0170.07321.00
5.6.90.0070.08321.05
5.6.80.0170.07020.43
5.5.280.0100.05020.91
5.5.270.0070.07020.90
5.5.260.0070.08720.69
5.5.250.0100.03720.69
5.5.240.0030.08020.14
5.4.440.0670.05719.45
5.4.430.0430.05319.60
5.4.420.0070.05719.30
5.4.410.0000.06019.57
5.4.400.0500.05319.38
5.4.390.0670.05719.28
5.4.380.0830.04318.98
5.4.370.0770.05719.14
5.4.360.0130.05319.15
5.4.350.0030.05718.87
5.4.340.0400.06319.15
5.4.320.0800.06019.15
5.4.310.1030.05719.16
5.4.300.0970.04718.89
5.4.290.0870.05019.15
5.4.280.0900.05319.15
5.4.270.0730.05719.25
5.4.260.0230.05719.38
5.4.250.0130.06319.37
5.4.240.0130.05018.86
5.4.230.0800.05719.20
5.4.220.0830.05719.27
5.4.210.0900.05319.00
5.4.200.0830.05016.70
5.4.190.1030.04718.98
5.4.180.0900.04719.14
5.4.170.0970.04018.88
5.4.160.0830.06019.16
5.4.150.0830.05019.07
5.4.140.0870.04716.46
5.4.130.0800.05016.61
5.4.120.0700.04716.56
5.4.110.0830.05016.62
5.4.100.0600.05716.60
5.4.90.0730.04716.55
5.4.80.0700.04716.34
5.4.70.0930.04316.53
5.4.60.0830.04716.41
5.4.50.0830.05016.32
5.4.40.0700.05016.37
5.4.30.0800.05316.44
5.4.20.0830.05316.35
5.4.10.0800.05016.41
5.4.00.0900.04315.88
5.3.290.0870.05014.58
5.3.280.0900.04714.62
5.3.270.0830.05314.76
5.3.260.0870.05014.53
5.3.250.0870.05314.67
5.3.240.0930.04714.66
5.3.230.0700.05314.75
5.3.220.0900.04314.72
5.3.210.0770.06014.59
5.3.200.0970.04014.63
5.3.190.0800.05314.45
5.3.180.0970.05714.72
5.3.170.0830.04714.59
5.3.160.0770.05314.80
5.3.150.0830.04714.49
5.3.140.0930.04714.42
5.3.130.0900.04714.61
5.3.120.0930.04014.46
5.3.110.0770.06314.48
5.3.100.0900.04314.10
5.3.90.0800.05313.95
5.3.80.0730.04314.03
5.3.70.0830.04714.03
5.3.60.0830.04314.02
5.3.50.0630.05714.19
5.3.40.0670.05313.97
5.3.30.0830.05013.83
5.3.20.0870.04313.62
5.3.10.0600.06013.57
5.3.00.0800.03713.57
5.2.170.0530.04011.38
5.2.160.0500.06011.11
5.2.150.0770.04011.20
5.2.140.0630.03711.37
5.2.130.0600.03310.97
5.2.120.0600.04011.02
5.2.110.0830.04311.15
5.2.100.0670.03310.96
5.2.90.0530.04011.05
5.2.80.0430.05311.11
5.2.70.0600.03711.14
5.2.60.0500.04711.06
5.2.50.0770.04710.88
5.2.40.0500.04311.05
5.2.30.0500.05010.97
5.2.20.0470.03311.18
5.2.10.0370.04310.72
5.2.00.0430.04310.86
5.1.60.0500.03310.01
5.1.50.0630.03010.00
5.1.40.0500.0409.95
5.1.30.0570.04010.34
5.1.20.0500.03310.40
5.1.10.0500.03310.08
5.1.00.0370.0409.91
5.0.50.0270.0308.50
5.0.40.0300.0308.44
5.0.30.0270.0408.13
5.0.20.0230.0338.18
5.0.10.0170.0378.06
5.0.00.0230.0408.23
4.4.90.0370.0235.89
4.4.80.0270.0275.83
4.4.70.0270.0275.83
4.4.60.0170.0275.83
4.4.50.0230.0275.80
4.4.40.0300.0405.82
4.4.30.0270.0235.85
4.4.20.0270.0205.83
4.4.10.0330.0305.83
4.4.00.0370.0405.95
4.3.110.0430.0275.69
4.3.100.0130.0275.85
4.3.90.0330.0175.67
4.3.80.0300.0375.72
4.3.70.0230.0235.82
4.3.60.0270.0175.66
4.3.50.0270.0235.70
4.3.40.0200.0275.66
4.3.30.0100.0274.51
4.3.20.0170.0234.49
4.3.10.0170.0174.45
4.3.00.0100.0178.43

preferences:
147.37 ms | 1394 KiB | 7 Q