3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! class A { private $a; private $b; public function __construct() { $this->a = 1; $this->b = 2; } public function __get($name) { switch ($name) { // protected: case 'a': return $this->a; break; // public case 'b': return $this->b; break; } } } class B extends A { public function getA() { return $this->a; } } $B = new B(); echo $B->b; // valid echo $B->a; // shouldn't be possible echo $B->getA() // valid

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.170.3270.03719.20
5.4.160.3200.04019.20
5.4.150.3230.04019.20
5.4.140.3170.03716.54
5.4.130.2930.03716.33
5.4.120.3170.04016.38
5.4.110.3570.04016.61
5.4.100.3200.03716.56
5.4.90.3300.03016.40
5.4.80.3300.03316.49
5.4.70.3200.03716.60
5.4.60.3200.03316.43
5.4.50.3130.03316.55
5.4.40.3230.03716.32
5.4.30.3000.03316.32
5.4.20.3130.03316.28
5.4.10.3300.03316.27
5.4.00.3200.03315.96
5.3.270.3230.03714.84
5.3.260.3300.03714.51
5.3.250.3170.04314.53
5.3.240.3230.03314.66
5.3.230.3000.03014.59
5.3.220.3070.03014.79
5.3.210.3170.04014.65
5.3.200.3030.03314.50
5.3.190.3170.03314.62
5.3.180.3100.02714.73
5.3.170.3200.03714.64
5.3.160.3100.04014.79
5.3.150.3030.03714.68
5.3.140.3600.04014.54
5.3.130.3470.03314.57
5.3.120.3770.03714.71
5.3.110.3930.04314.77
5.3.100.3130.04714.16
5.3.90.3200.03714.16
5.3.80.3330.03314.16
5.3.70.2900.04014.16
5.3.60.3170.03714.23
5.3.50.3200.04014.16
5.3.40.3300.03714.18
5.3.30.2930.03714.16
5.3.20.3200.03714.16
5.3.10.3200.03314.16
5.3.00.3200.04014.16

preferences:
154.51 ms | 1394 KiB | 7 Q