3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public function __construct($b) { $this->b = $b; } private function aa() { echo 'a::aa'; } public function b() { $that = $this; $this->b->f(function() use ($that { $that->aa(); }); } } class b { public function f($f) { $f(); } } $a = new a(new b); $a->b();

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.100.0070.08021.02
5.6.90.0030.08021.02
5.6.80.0070.04020.50
5.6.70.4030.04020.29
5.5.260.0070.08320.90
5.5.250.0070.07720.80
5.5.240.0330.06720.27
5.4.420.0170.05019.46
5.4.410.0130.05719.32
5.4.400.0100.05319.23
5.4.390.0030.06019.16
5.4.380.0100.05719.07
5.4.370.0230.04319.06
5.4.360.0170.05019.13
5.4.350.0100.05319.16
5.4.340.0200.04319.09
5.4.320.0070.05719.00
5.4.310.0200.05019.08
5.4.300.0030.06019.11
5.4.290.0200.04019.01
5.4.280.0070.05719.08
5.4.270.0030.06019.08
5.4.260.0070.05719.11
5.4.250.0130.05019.15
5.4.240.0230.04319.12
5.4.230.0000.06018.97
5.4.220.0130.05019.23
5.4.210.0000.07019.11
5.4.200.0030.05717.05
5.4.190.0130.05019.14
5.4.180.0170.06319.19
5.4.170.0100.06019.22
5.4.160.0070.05319.04
5.4.150.0170.04719.04
5.4.140.0200.04716.41
5.4.130.0130.04316.50
5.4.120.0070.05016.49
5.4.110.0100.04716.45
5.4.100.0070.05716.49
5.4.90.0100.05716.63
5.4.80.0070.06016.32
5.4.70.0100.05316.60
5.4.60.0130.04316.55
5.4.50.0130.04716.61
5.4.40.0200.04016.55
5.4.30.0100.05016.59
5.4.20.0170.04316.51
5.4.10.0100.05016.26
5.4.00.0130.04716.01
5.3.290.0170.05014.60
5.3.280.0070.06314.51
5.3.270.0130.06314.69
5.3.260.0000.06314.52
5.3.250.0070.05314.52
5.3.240.0170.05314.67
5.3.230.0000.06314.72
5.3.220.0200.06014.58
5.3.210.0030.06014.65
5.3.200.0270.03714.60
5.3.190.0130.05014.49
5.3.180.0030.05314.57
5.3.170.0070.05314.59
5.3.160.0170.04314.60
5.3.150.0100.05314.60
5.3.140.0100.05014.48
5.3.130.0100.06314.46
5.3.120.0000.06314.72
5.3.110.0070.05714.72
5.3.100.0070.05314.01
5.3.90.0030.05714.04
5.3.80.0270.03314.01
5.3.70.0170.04314.09
5.3.60.0070.05013.92
5.3.50.0100.04714.11
5.3.40.0070.05313.93
5.3.30.0000.06013.90
5.3.20.0100.05013.71
5.3.10.0100.04713.59
5.3.00.0100.05013.55
5.2.170.0070.04311.01
5.2.160.0100.03711.06
5.2.150.0100.04011.09
5.2.140.0200.02711.31
5.2.130.0130.03311.10
5.2.120.0130.03311.02
5.2.110.0100.04011.09
5.2.100.0100.03711.17
5.2.90.0100.03711.06
5.2.80.0030.05311.09
5.2.70.0000.06711.06
5.2.60.0000.05011.11
5.2.50.0100.04310.95
5.2.40.0070.04710.96
5.2.30.0100.04310.99
5.2.20.0070.04310.97
5.2.10.0030.04310.85
5.2.00.0000.05310.82
5.1.60.0100.02710.15
5.1.50.0030.04710.00
5.1.40.0100.04310.13
5.1.30.0070.04710.32
5.1.20.0030.04010.42
5.1.10.0030.03710.20
5.1.00.0170.0279.96
5.0.50.0030.0308.45
5.0.40.0030.0278.47
5.0.30.0070.0408.34
5.0.20.0070.0238.13
5.0.10.0070.0278.17
5.0.00.0000.0478.16
4.4.90.0030.0235.86
4.4.80.0100.0175.83
4.4.70.0070.0275.74
4.4.60.0130.0205.73
4.4.50.0000.0375.84
4.4.40.0100.0505.75
4.4.30.0030.0375.82
4.4.20.0100.0305.90
4.4.10.0030.0305.92
4.4.00.0070.0305.95
4.3.110.0070.0205.84
4.3.100.0030.0205.68
4.3.90.0000.0235.75
4.3.80.0030.0335.75
4.3.70.0070.0175.64
4.3.60.0030.0205.64
4.3.50.0030.0305.80
4.3.40.0030.0335.71
4.3.30.0100.0134.45
4.3.20.0000.0234.54
4.3.10.0030.0204.45
4.3.00.0130.0276.86

preferences:
149.48 ms | 1394 KiB | 7 Q