3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySuperEntity { private $attributes; function __construct(array $attributes=[]) { $this->attributes = $attributes; } function __get($name) { return array_has_key($name, $this->attributes) ? $this->attributes[$name] : null; } } $model = new MySuperEntity([ 'foo' => 'bar' ]) for($i=0;$i<10000;$i++) { $model->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.350.0180.12412.04
5.4.340.0120.07312.04
5.4.320.0220.07412.52
5.4.310.0100.05112.51
5.4.300.0110.04412.52
5.4.290.0070.07112.51
5.4.280.0130.05412.41
5.4.270.0120.05112.41
5.4.260.0160.06512.41
5.4.250.0110.07012.41
5.4.240.0140.06612.41
5.4.230.0180.11112.41
5.4.220.0120.04812.41
5.4.210.0120.05612.41
5.4.200.0110.03812.40
5.4.190.0090.03812.40
5.4.180.0110.04812.40
5.4.170.0080.05412.41
5.4.160.0160.05012.41
5.4.150.0090.03612.40
5.4.140.0070.03712.09
5.4.130.0090.03712.07
5.4.120.0080.04512.04
5.4.110.0090.04612.04
5.4.100.0040.04212.04
5.4.90.0130.03812.04
5.4.80.0020.04412.04
5.4.70.0080.03512.03
5.4.60.0030.04012.03
5.4.50.0060.04112.03
5.4.40.0100.04612.02
5.4.30.0170.07412.02
5.4.20.0050.04512.01
5.4.10.0080.03812.02
5.4.00.0080.04111.51
5.3.290.0090.06112.80
5.3.280.0200.08612.71
5.3.270.0080.05012.72
5.3.260.0110.04512.72
5.3.250.0100.07112.72
5.3.240.0130.06312.72
5.3.230.0210.07212.71
5.3.220.0140.05712.68
5.3.210.0190.07812.68
5.3.200.0090.04812.68
5.3.190.0100.06612.68
5.3.180.0090.03912.68
5.3.170.0060.05112.66
5.3.160.0020.04112.67
5.3.150.0090.03612.67
5.3.140.0070.03612.66
5.3.130.0070.04012.66
5.3.120.0070.04112.66
5.3.110.0090.04312.65
5.3.100.0110.04012.12
5.3.90.0090.05512.11
5.3.80.0030.04112.09
5.3.70.0090.03412.09
5.3.60.0070.03612.08
5.3.50.0100.03812.03
5.3.40.0100.03712.03
5.3.30.0110.04711.98
5.3.20.0120.03811.76
5.3.10.0060.04011.73
5.3.00.0080.03811.72
5.2.170.0090.0309.22
5.2.160.0070.0299.22
5.2.150.0040.0339.22
5.2.140.0060.0329.22
5.2.130.0070.0329.18
5.2.120.0100.0369.18
5.2.110.0060.0389.18
5.2.100.0080.0389.18
5.2.90.0070.0409.18
5.2.80.0080.0429.17
5.2.70.0070.0439.18
5.2.60.0100.0419.12
5.2.50.0080.0409.09
5.2.40.0060.0379.07
5.2.30.0060.0399.05
5.2.20.0090.0349.04
5.2.10.0080.0348.94
5.2.00.0090.0358.81
5.1.60.0070.0298.09
5.1.50.0030.0348.09
5.1.40.0070.0318.07
5.1.30.0050.0358.42
5.1.20.0060.0368.44
5.1.10.0100.0288.17
5.1.00.0050.0338.16
5.0.50.0060.0246.64
5.0.40.0090.0216.50
5.0.30.0030.0376.32
5.0.20.0090.0286.28
5.0.10.0070.0276.26
5.0.00.0090.0356.25
4.4.90.0020.0254.78
4.4.80.0030.0224.76
4.4.70.0000.0234.75
4.4.60.0080.0174.75
4.4.50.0050.0214.77
4.4.40.0030.0324.71
4.4.30.0060.0184.76
4.4.20.0040.0204.85
4.4.10.0010.0224.85
4.4.00.0020.0334.76
4.3.110.0040.0204.67
4.3.100.0030.0204.66
4.3.90.0030.0204.63
4.3.80.0030.0304.59
4.3.70.0040.0184.63
4.3.60.0050.0264.63
4.3.50.0070.0194.63
4.3.40.0070.0314.54
4.3.30.0050.0183.30
4.3.20.0070.0243.28
4.3.10.0030.0203.23
4.3.00.0170.0177.04

preferences:
162.53 ms | 1394 KiB | 7 Q