3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $bar = 10; public function foo(A $other) { $other->bar = 10; } public function getBar() { return $this->bar } } class B extends A { public function frobnicate(A $other) { $other->bar = 10; } } $a = new A(); $b = new B(); $b->frobnicate($a); print $a->getBar();

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.80.0070.08020.44
5.5.240.0000.07320.26
5.4.400.0330.06718.54
5.4.390.0230.06718.62
5.4.380.0230.07318.78
5.4.370.0270.06718.83
5.4.360.0230.07318.82
5.4.350.0270.07018.70
5.4.340.0230.07318.62
5.4.320.0200.07718.74
5.4.310.0170.08018.62
5.4.300.0300.06318.52
5.4.290.0300.05718.80
5.4.280.0300.04718.53
5.4.270.0300.05018.74
5.4.260.0200.05718.75
5.4.250.0200.05718.50
5.4.240.0130.06318.53
5.4.230.0170.06018.61
5.4.220.0170.06018.77
5.4.210.0170.06018.75
5.4.200.0230.05016.78
5.4.190.0130.06318.52
5.4.180.0270.05018.68
5.4.170.0300.05018.68
5.4.160.0200.07318.57
5.4.150.0170.06318.67
5.4.140.0230.06716.29
5.4.130.0200.07316.33
5.4.120.0300.06316.20
5.4.110.0130.06316.19
5.4.100.0200.05716.25
5.4.90.0230.05716.21
5.4.80.0300.05316.30
5.4.70.0230.07316.28
5.4.60.0300.04316.21
5.4.50.0270.05016.30
5.4.40.0330.06016.27
5.4.30.0230.05316.20
5.4.20.0230.07016.22
5.4.10.0270.06316.26
5.4.00.0400.04715.75
5.3.290.0230.07314.87
5.3.280.0300.06314.82
5.3.270.0270.07314.81
5.3.260.0370.06314.60
5.3.250.0300.06714.75
5.3.240.0300.06314.71
5.3.230.0370.06014.74
5.3.220.0370.06014.55
5.3.210.0200.07314.60
5.3.200.0200.07014.61
5.3.190.0300.06014.67
5.3.180.0270.06314.70
5.3.170.0230.06314.70
5.3.160.0130.07014.73
5.3.150.0100.08014.58
5.3.140.0200.07014.69
5.3.130.0100.08314.71
5.3.120.0270.05314.59
5.3.110.0300.06314.73
5.3.100.0230.06714.21
5.3.90.0270.06314.02
5.3.80.0300.05714.14
5.3.70.0170.07314.15
5.3.60.0370.05014.05
5.3.50.0130.07314.05
5.3.40.0170.06313.98
5.3.30.0200.05714.07
5.3.20.0230.05013.86
5.3.10.0130.06013.82
5.3.00.0200.05313.76
5.2.170.0130.04711.21
5.2.160.0200.03711.19
5.2.150.0130.04311.26
5.2.140.0300.05011.18
5.2.130.0200.04011.23
5.2.120.0270.04311.33
5.2.110.0100.04711.15
5.2.100.0100.04711.11
5.2.90.0130.04311.11
5.2.80.0200.04011.21
5.2.70.0170.04711.08
5.2.60.0170.05311.09
5.2.50.0170.06011.00
5.2.40.0170.05311.20
5.2.30.0130.06010.96
5.2.20.0100.06011.17
5.2.10.0130.05310.86
5.2.00.0200.03710.92
5.1.60.0070.04010.20
5.1.50.0100.03710.15
5.1.40.0030.05310.09
5.1.30.0200.04010.41
5.1.20.0230.04010.39
5.1.10.0130.04710.26
5.1.00.0070.05710.20
5.0.50.0100.0378.59
5.0.40.0200.0238.50
5.0.30.0030.0538.25
5.0.20.0070.0378.18
5.0.10.0130.0378.21
5.0.00.0100.0538.35
4.4.90.0130.0277.12
4.4.80.0130.0307.12
4.4.70.0200.0207.12
4.4.60.0100.0237.12
4.4.50.0070.0307.12
4.4.40.0030.0477.12
4.4.30.0130.0177.12
4.4.20.0070.0277.12
4.4.10.0030.0277.12
4.4.00.0130.0337.12
4.3.110.0100.0277.12
4.3.100.0070.0277.12
4.3.90.0030.0237.20
4.3.80.0100.0407.20
4.3.70.0030.0337.20
4.3.60.0030.0337.20
4.3.50.0000.0377.20
4.3.40.0130.0377.20
4.3.30.0030.0237.20
4.3.20.0100.0237.20
4.3.10.0130.0207.20
4.3.00.0070.0177.00

preferences:
143.82 ms | 1394 KiB | 7 Q