3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {protected $a = 'A'; /*public function __get($f){ return 'field_'.$f;*/ }} class B extends A {} class C extends A { public function foo() { $b = new B(); echo $b->a; } } $c = new C(); $c->foo();

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.380.0970.05318.80
5.4.370.0870.05318.78
5.4.360.0930.04718.77
5.4.350.0900.05718.75
5.4.340.0930.05018.62
5.4.320.0930.05318.71
5.4.310.0900.05318.84
5.4.300.1000.04318.77
5.4.290.0870.05318.52
5.4.280.0930.04718.59
5.4.270.0830.05718.58
5.4.260.0970.04718.73
5.4.250.0970.05318.84
5.4.240.1130.07318.61
5.4.230.0970.07718.61
5.4.220.0830.05718.45
5.4.210.0970.04718.49
5.4.200.0830.05716.68
5.4.190.0770.05718.74
5.4.180.0800.04718.59
5.4.170.0970.04718.61
5.4.160.0170.05018.73
5.4.150.0170.05318.43
5.4.140.0200.06016.48
5.4.130.0270.05716.36
5.4.120.0300.05716.25
5.4.110.0170.06716.37
5.4.100.0200.06716.33
5.4.90.0200.06716.26
5.4.80.0230.04016.34
5.4.70.0100.05716.31
5.4.60.0230.04316.40
5.4.50.0230.06016.23
5.4.40.0300.05716.25
5.4.30.0200.04716.40
5.4.20.0130.05316.40
5.4.10.0130.05316.17
5.4.00.0270.03715.64
5.3.290.0230.05014.66
5.3.280.0230.05714.61
5.3.270.0100.08314.64
5.3.260.0230.07014.77
5.3.250.0270.05714.64
5.3.240.0170.05314.80
5.3.230.0170.05014.63
5.3.220.0130.05314.75
5.3.210.0200.04714.66
5.3.200.0130.05314.69
5.3.190.0100.05714.59
5.3.180.0200.04714.55
5.3.170.0130.05314.66
5.3.160.0170.05014.74
5.3.150.0170.05714.58
5.3.140.0270.06014.60
5.3.130.0130.05714.76
5.3.120.0200.05014.76
5.3.110.0200.05014.52
5.3.100.0100.05714.07
5.3.90.0230.04314.04
5.3.80.0200.04714.11
5.3.70.0130.05714.23
5.3.60.0200.05713.99
5.3.50.0130.07313.96
5.3.40.0230.06314.16
5.3.30.0170.05014.00
5.3.20.0130.05313.75
5.3.10.0200.04713.77
5.3.00.0170.05013.61
5.2.170.0070.04711.21
5.2.160.0100.04311.18
5.2.150.0130.04311.16
5.2.140.0170.04011.35
5.2.130.0130.04311.22
5.2.120.0100.04311.32
5.2.110.0200.03311.31
5.2.100.0130.03711.32
5.2.90.0130.04011.09
5.2.80.0130.04011.16
5.2.70.0130.04311.16
5.2.60.0130.04011.25
5.2.50.0100.04711.08
5.2.40.0030.05011.12
5.2.30.0130.04311.01
5.2.20.0170.04311.06
5.2.10.0130.04710.88
5.2.00.0230.04010.89
5.1.60.0170.02710.18
5.1.50.0130.0379.98
5.1.40.0170.04010.01
5.1.30.0070.04310.45
5.1.20.0100.04010.43
5.1.10.0070.04710.15
5.1.00.0170.04310.05
5.0.50.0070.0308.68
5.0.40.0170.0308.54
5.0.30.0100.0408.32
5.0.20.0100.0278.38
5.0.10.0070.0278.21
5.0.00.0100.0408.26
4.4.90.0070.0206.02
4.4.80.0100.0276.00
4.4.70.0000.0275.89
4.4.60.0070.0235.93
4.4.50.0030.0275.96
4.4.40.0070.0405.88
4.4.30.0100.0235.96
4.4.20.0070.0275.94
4.4.10.0130.0135.92
4.4.00.0100.0405.90
4.3.110.0030.0275.81
4.3.100.0100.0175.88
4.3.90.0100.0175.79
4.3.80.0030.0435.89
4.3.70.0070.0205.82
4.3.60.0100.0175.80
4.3.50.0000.0275.79
4.3.40.0030.0375.74
4.3.30.0000.0274.56
4.3.20.0070.0204.56
4.3.10.0000.0274.57
4.3.00.0330.01315.09

preferences:
146.66 ms | 1394 KiB | 7 Q