3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $bar; public function __construct(Bar $bar) { $this->bar = $bar; } public function __get($key) { $exploded = explode('.', $key); $item = $this; do { $next = array_shift($exploded); if (!property_exists($item, $next})) { return null; } $item = $item->{$next}; } return $item; } } class Bar { public $foo = 'test'; } $foo = new Foo(new Bar); $foo->bar.test;

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.320.0040.04012.52
5.4.310.0110.04112.51
5.4.300.0060.04712.52
5.4.290.0070.04212.52
5.4.280.0040.03812.41
5.4.270.0060.03712.41
5.4.260.0100.04412.41
5.4.250.0120.03912.41
5.4.240.0070.03412.41
5.4.230.0080.03612.41
5.4.220.0100.03812.41
5.4.210.0070.03512.40
5.4.200.0090.03712.40
5.4.190.0060.03912.40
5.4.180.0070.03612.40
5.4.170.0160.04012.41
5.4.160.0080.03412.41
5.4.150.0110.03812.40
5.4.140.0100.04112.09
5.4.130.0080.03612.07
5.4.120.0040.03712.04
5.4.110.0090.03712.04
5.4.100.0060.03712.04
5.4.90.0060.04812.03
5.4.80.0040.03912.04
5.4.70.0050.04512.03
5.4.60.0140.03912.03
5.4.50.0070.03512.03
5.4.40.0080.03212.02
5.4.30.0070.04312.01
5.4.20.0100.04412.01
5.4.10.0110.03712.02
5.4.00.0080.03611.50
5.3.290.0120.04812.80
5.3.280.0120.03512.71
5.3.270.0090.03612.72
5.3.260.0070.03812.71
5.3.250.0100.04912.72
5.3.240.0110.04412.72
5.3.230.0080.04412.71
5.3.220.0060.05212.68
5.3.210.0090.04612.68
5.3.200.0090.05012.68
5.3.190.0080.03812.68
5.3.180.0070.04212.68
5.3.170.0100.04612.67
5.3.160.0060.03612.68
5.3.150.0110.04212.67
5.3.140.0050.03812.66
5.3.130.0080.03812.66
5.3.120.0040.04112.66
5.3.110.0050.04012.66
5.3.100.0060.03712.13
5.3.90.0080.03512.11
5.3.80.0060.03612.09
5.3.70.0080.03512.09
5.3.60.0060.03612.08
5.3.50.0080.03412.03
5.3.40.0110.03712.03
5.3.30.0090.03611.99
5.3.20.0100.04111.77
5.3.10.0070.04611.74
5.3.00.0070.04211.72
5.2.170.0090.0339.23
5.2.160.0030.0309.23
5.2.150.0030.0379.23
5.2.140.0070.0459.22
5.2.130.0010.0329.18
5.2.120.0070.0269.18
5.2.110.0030.0319.19
5.2.100.0030.0399.18
5.2.90.0080.0289.18
5.2.80.0080.0369.18
5.2.70.0050.0399.18
5.2.60.0040.0349.13
5.2.50.0040.0319.10
5.2.40.0060.0289.07
5.2.30.0060.0299.05
5.2.20.0040.0319.04
5.2.10.0050.0288.95
5.2.00.0050.0288.82
5.1.60.0090.0288.09
5.1.50.0050.0318.09
5.1.40.0060.0288.08
5.1.30.0040.0278.43
5.1.20.0040.0278.45
5.1.10.0060.0268.16
5.1.00.0030.0278.17
5.0.50.0050.0226.65
5.0.40.0030.0196.51
5.0.30.0020.0326.32
5.0.20.0040.0196.29
5.0.10.0060.0186.26
5.0.00.0040.0316.25
4.4.90.0020.0174.78
4.4.80.0030.0194.76
4.4.70.0040.0204.76
4.4.60.0030.0204.75
4.4.50.0050.0204.77
4.4.40.0050.0264.71
4.4.30.0010.0174.76
4.4.20.0030.0154.84
4.4.10.0040.0144.85
4.4.00.0050.0224.76
4.3.110.0050.0264.66
4.3.100.0010.0234.67
4.3.90.0040.0224.64
4.3.80.0050.0294.59
4.3.70.0030.0184.63
4.3.60.0040.0164.63
4.3.50.0040.0164.63
4.3.40.0090.0424.54
4.3.30.0010.0173.30
4.3.20.0010.0173.28
4.3.10.0020.0163.24
4.3.00.0000.01318.16

preferences:
138.84 ms | 1394 KiB | 7 Q