3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo = 'foo'; protected $bar = 'bar'; } class FooProxy extends Some { private $wrapped; // ... private static $publicProperties = array('foo' => true); public function __construct(Foo $wrapped) { $this->wrapped = $wrapped; } public function & __get($name) { return isset(self::$publicProperties[$name]) ? & $this->wrapped->$name : PublicAccessEmulator::get($this->wrapped, $name); } } class PublicAccessEmulator { & public static function get($object, $name) { return & $object->$name; } } $foo = new FooProxy(new Foo()); var_dump($foo->foo); var_dump($foo->bar);

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.5.00.0000.07720.00
5.4.160.0100.06718.89
5.4.150.0100.06719.19
5.4.140.0000.08016.49
5.4.130.0030.06316.48
5.4.120.0030.06316.50
5.4.110.0030.07316.48
5.4.100.0030.07316.54
5.4.90.0030.06716.43
5.4.80.0000.07016.43
5.4.70.0030.07316.55
5.4.60.0070.07016.48
5.4.50.0070.05316.35
5.4.40.0030.06716.42
5.4.30.0000.07316.43
5.4.20.0000.06316.51
5.4.10.0070.06316.32
5.4.00.0030.05715.78
5.3.260.0070.07714.63
5.3.250.0000.08014.61
5.3.240.0070.06714.66
5.3.230.0030.06014.60
5.3.220.0070.07314.64
5.3.210.0000.08014.43
5.3.200.0070.07014.63
5.3.190.0070.05014.54
5.3.180.0070.04714.63
5.3.170.0030.06714.54
5.3.160.0030.07714.62
5.3.150.0000.07014.68
5.3.140.0000.07014.42
5.3.130.0070.07014.60
5.3.120.0100.07314.63
5.3.110.0070.07314.60
5.3.100.0070.06314.10
5.3.90.0070.07014.12
5.3.80.0000.07014.00
5.3.70.0030.07314.11
5.3.60.0070.07014.06
5.3.50.0070.05713.96
5.3.40.0100.06713.96
5.3.30.0000.07713.98
5.3.20.0070.05013.75
5.3.10.0000.07313.49
5.3.00.0000.06713.54

preferences:
145.91 ms | 1394 KiB | 7 Q