3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @property stdClass $x * @property stdClass $y */ class C { private $buffer = array(); function __get($key) { if (array_key_exists($key, $this->buffer)) { return $this->buffer[$key]; } $f = 'calc_' . $key; return $this->buffer[$key] = $this->$f(); } function calc_x() { $x = new stdClass; $x->y = $this->y; return $x; } function calc_y() { $y = new stdClass; // Set a stub to avoid infinite recursion. $this->buffer['y'] = $y; $y->x = $this->x; return $y; } }

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)
8.3.60.0140.00416.25
8.3.50.0130.01221.14
8.3.40.0000.01518.41
8.3.30.0070.00718.72
8.3.20.0040.00420.23
8.3.10.0050.00323.38
8.3.00.0040.00423.66
8.2.180.0060.01216.38
8.2.170.0140.00722.96
8.2.160.0140.00720.47
8.2.150.0110.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00519.64
8.2.120.0040.00426.35
8.2.110.0090.00020.94
8.2.100.0060.00617.80
8.2.90.0050.00319.09
8.2.80.0040.00417.97
8.2.70.0000.00917.38
8.2.60.0080.00317.79
8.2.50.0040.00418.07
8.2.40.0070.00020.55
8.2.30.0070.00019.45
8.2.20.0040.00417.45
8.2.10.0070.00017.96
8.2.00.0040.00418.05
8.1.280.0110.00325.92
8.1.270.0030.00623.77
8.1.260.0060.00328.09
8.1.250.0030.00528.09
8.1.240.0060.00322.42
8.1.230.0080.00419.07
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0040.00417.10
8.1.190.0050.00316.88
8.1.180.0070.00018.10
8.1.170.0030.00518.51
8.1.160.0040.00420.57
8.1.150.0000.00818.73
8.1.140.0080.00019.46
8.1.130.0040.00417.64
8.1.120.0000.00917.35
8.1.110.0040.00417.30
8.1.100.0000.00817.39
8.1.90.0050.00217.22
8.1.80.0050.00317.25
8.1.70.0030.00317.36
8.1.60.0030.00617.39
8.1.50.0050.00317.30
8.1.40.0080.00017.43
8.1.30.0030.00517.43
8.1.20.0000.00817.37
8.1.10.0000.00717.36
8.1.00.0050.00317.29
8.0.300.0000.00818.77
8.0.290.0070.00016.63
8.0.280.0040.00418.24
8.0.270.0030.00317.10
8.0.260.0050.00317.05
8.0.250.0080.00016.72
8.0.240.0030.00516.83
8.0.230.0000.00716.83
8.0.220.0080.00016.70
8.0.210.0000.00716.83
8.0.200.0060.00016.81
8.0.190.0000.01116.84
8.0.180.0000.00716.71
8.0.170.0000.00816.84
8.0.160.0040.00416.87
8.0.150.0030.00416.63
8.0.140.0030.00516.75
8.0.130.0000.00513.20
8.0.120.0040.00416.71
8.0.110.0040.00416.78
8.0.100.0060.00316.84
8.0.90.0050.00216.84
8.0.80.0110.00616.83
8.0.70.0070.00016.84
8.0.60.0070.00016.58
8.0.50.0000.00716.58
8.0.30.0080.01117.13
8.0.20.0090.01117.40
8.0.10.0000.00816.93
8.0.00.0100.00916.66
7.4.330.0020.00216.84
7.4.320.0070.00016.50
7.4.300.0030.00316.46
7.4.290.0000.00916.31
7.4.280.0000.00916.47
7.4.270.0030.00316.44
7.4.260.0040.00416.49
7.4.250.0030.00316.50
7.4.240.0020.00516.41
7.4.230.0030.00316.38
7.4.220.0040.02016.52
7.4.210.0060.00916.42
7.4.200.0000.00716.21
7.4.160.0080.00816.40
7.4.150.0090.00917.40
7.4.140.0080.01317.86
7.4.130.0100.00716.34
7.4.120.0100.01016.46
7.4.110.0030.01716.48
7.4.100.0090.00916.50
7.4.90.0030.01316.31
7.4.80.0090.00919.39
7.4.70.0070.01016.54
7.4.60.0100.00716.25
7.4.50.0090.00316.36
7.4.40.0090.00916.48
7.4.30.0100.01016.25
7.4.00.0040.01115.04
7.3.330.0000.00713.05
7.3.320.0050.00013.22
7.3.310.0030.00316.09
7.3.300.0030.00416.10
7.3.290.0000.00616.21
7.3.280.0060.01016.19
7.3.270.0180.00017.40
7.3.260.0080.01116.26
7.3.250.0090.00916.25
7.3.240.0080.00916.34
7.3.230.0110.00616.39
7.3.210.0070.01016.33
7.3.200.0110.00919.39
7.3.190.0100.01316.33
7.3.180.0100.00716.28
7.3.170.0060.01216.27
7.3.160.0100.00616.32
7.2.330.0060.01116.40
7.2.320.0100.00716.50
7.2.310.0110.01116.63
7.2.300.0060.01016.61
7.2.290.0100.00716.41
7.2.60.0110.00416.83
7.1.200.0070.00415.51
7.1.70.0070.00017.09
7.1.60.0060.00619.18
7.1.50.0220.01116.77
7.1.00.0070.07322.57
7.0.200.0220.01016.62
7.0.60.0070.06721.87
7.0.50.0070.07717.90
7.0.40.0070.04019.97
7.0.30.0300.05720.33
7.0.20.0230.05020.25
7.0.10.0030.08720.12
7.0.00.0100.04020.23
5.6.280.0000.03320.93
5.6.210.0000.08720.51
5.6.200.0130.07318.20
5.6.190.0070.07020.57
5.6.180.0230.06020.46
5.6.170.0330.07320.50
5.6.160.0070.04320.51
5.6.150.0070.03718.28
5.6.140.0170.07018.28
5.6.130.0070.08318.27
5.6.120.0070.04721.16
5.6.110.0030.08721.00
5.6.100.0070.08721.09
5.6.90.0030.09320.95
5.6.80.0070.08020.51
5.5.350.0330.07720.36
5.5.340.0100.07018.08
5.5.330.0130.04320.40
5.5.320.0300.07720.31
5.5.310.0200.05020.27
5.5.300.0130.07317.94
5.5.290.0070.08318.08
5.5.280.0030.04320.88
5.5.270.0030.04020.81
5.5.260.0100.06320.84
5.5.250.0200.04320.62
5.5.240.0230.07020.07

preferences:
45.26 ms | 401 KiB | 5 Q