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; } } $c = new C; $c->x; $c = new C; $c->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.88
8.3.50.0070.01721.21
8.3.40.0000.01518.65
8.3.30.0040.01418.67
8.3.20.0040.00420.34
8.3.10.0000.00721.91
8.3.00.0120.00323.49
8.2.180.0130.00916.88
8.2.170.0060.00922.96
8.2.160.0030.01022.13
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00419.95
8.2.120.0040.00426.35
8.2.110.0100.00019.30
8.2.100.0110.00019.48
8.2.90.0060.00319.35
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0040.00422.27
8.2.30.0070.00019.45
8.2.20.0040.00417.76
8.2.10.0050.00318.05
8.2.00.0040.00418.20
8.1.280.0090.00625.92
8.1.270.0190.00023.91
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0070.01021.37
8.1.230.0040.00722.13
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0110.00017.38
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0040.00418.57
8.1.160.0000.00720.82
8.1.150.0000.00818.80
8.1.140.0040.00419.57
8.1.130.0030.00617.51
8.1.120.0070.00417.34
8.1.110.0040.00417.45
8.1.100.0050.00317.45
8.1.90.0000.00717.27
8.1.80.0000.00717.42
8.1.70.0030.00317.42
8.1.60.0090.00017.61
8.1.50.0040.00417.52
8.1.40.0060.00317.58
8.1.30.0000.00817.57
8.1.20.0080.00017.66
8.1.10.0040.00417.55
8.1.00.0040.00417.56
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.34
8.0.270.0030.00317.34
8.0.260.0030.00316.88
8.0.250.0040.00417.04
8.0.240.0020.00517.06
8.0.230.0050.00317.04
8.0.220.0050.00316.96
8.0.210.0000.00716.93
8.0.200.0030.00316.96
8.0.190.0040.00716.92
8.0.180.0000.00716.89
8.0.170.0000.00816.90
8.0.160.0030.00516.93
8.0.150.0030.00316.94
8.0.140.0080.00016.95
8.0.130.0050.00013.38
8.0.120.0000.00816.92
8.0.110.0070.00016.98
8.0.100.0030.00616.88
8.0.90.0000.00816.79
8.0.80.0030.01216.93
8.0.70.0050.00316.77
8.0.60.0040.00416.74
8.0.50.0070.00016.80
8.0.30.0090.00916.96
8.0.20.0130.01017.40
8.0.10.0030.00517.09
8.0.00.0040.01616.76
7.4.330.0050.00016.82
7.4.320.0030.00316.62
7.4.300.0080.00016.62
7.4.290.0040.00416.61
7.4.280.0090.00016.52
7.4.270.0070.00016.63
7.4.260.0100.00016.48
7.4.250.0040.00416.57
7.4.240.0020.00616.54
7.4.230.0070.00016.27
7.4.220.0040.00416.51
7.4.210.0070.00916.58
7.4.200.0000.00716.36
7.4.160.0030.01316.40
7.4.150.0120.00617.40
7.4.140.0110.00817.86
7.4.130.0080.00916.64
7.4.120.0090.00916.48
7.4.110.0120.00916.49
7.4.100.0130.01316.46
7.4.90.0090.00616.47
7.4.80.0150.00319.39
7.4.70.0120.00916.38
7.4.60.0080.00816.57
7.4.50.0100.00716.51
7.4.40.0070.01016.41
7.4.30.0080.01316.51
7.4.00.0000.01715.11
7.3.330.0030.00313.23
7.3.320.0030.00313.44
7.3.310.0070.00016.46
7.3.300.0070.00016.42
7.3.290.0030.00316.45
7.3.280.0060.01316.41
7.3.270.0070.01017.40
7.3.260.0090.00916.39
7.3.250.0090.01016.46
7.3.240.0100.01016.53
7.3.230.0090.00916.63
7.3.210.0130.00316.51
7.3.200.0100.00719.39
7.3.190.0080.00816.46
7.3.180.0100.00616.61
7.3.170.0100.00716.66
7.3.160.0060.00916.57
7.3.10.0090.00316.67
7.3.00.0070.00716.63
7.2.330.0090.00916.53
7.2.320.0090.00916.71
7.2.310.0130.00316.58
7.2.300.0030.01316.80
7.2.290.0130.00316.73
7.2.130.0040.00816.83
7.2.120.0070.01116.85
7.2.110.0140.00716.69
7.2.100.0030.00616.66
7.2.90.0120.00616.55
7.2.80.0030.01016.58
7.2.70.0130.00616.94
7.2.60.0050.01016.71
7.2.50.0000.00917.06
7.2.40.0100.00316.84
7.2.30.0000.01516.71
7.2.20.0130.00616.85
7.2.10.0130.00316.92
7.2.00.0040.00918.25
7.1.250.0150.00415.83
7.1.240.0090.00015.65
7.1.230.0070.00715.79
7.1.220.0090.01015.84
7.1.210.0100.00315.79
7.1.200.0060.00615.79
7.1.190.0140.00015.91
7.1.180.0000.00815.93
7.1.170.0080.00615.53
7.1.160.0030.00915.92
7.1.150.0040.00815.78
7.1.140.0160.00315.70
7.1.130.0100.01015.75
7.1.120.0060.00315.70
7.1.110.0110.00415.71
7.1.100.0030.00816.87
7.1.90.0030.00715.84
7.1.80.0080.00015.98
7.1.70.0070.01016.47
7.1.60.0070.01017.54
7.1.50.0070.00816.40
7.1.40.0050.00315.52
7.1.30.0040.01115.53
7.1.20.0100.00715.75
7.1.10.0090.00015.54
7.1.00.0070.03819.11
7.0.330.0100.00315.31
7.0.320.0040.00815.25
7.0.310.0130.00315.13
7.0.300.0040.00815.45
7.0.290.0000.01415.32
7.0.280.0040.01115.46
7.0.270.0120.00015.45
7.0.260.0070.01015.29
7.0.250.0030.00615.36
7.0.240.0100.00715.43
7.0.230.0040.00715.19
7.0.220.0070.00715.50
7.0.210.0000.00815.33
7.0.200.0190.00516.00
7.0.190.0030.00615.37
7.0.180.0050.00515.47
7.0.170.0100.00315.26
7.0.160.0110.00415.47
7.0.150.0060.00615.13
7.0.140.0040.00415.25
7.0.130.0040.01115.13
7.0.120.0040.00415.42
7.0.110.0030.00615.21
7.0.100.0080.01115.52
7.0.90.0100.00315.46
7.0.80.0120.00315.37
7.0.70.0060.00615.34
7.0.60.0040.04618.63
7.0.50.0070.03716.83
7.0.40.0030.02416.86
7.0.30.0130.03416.75
7.0.20.0200.03216.93
7.0.10.0020.04116.93
7.0.00.0080.04416.75
5.6.380.0100.00314.67
5.6.370.0000.01114.29
5.6.360.0030.01014.45
5.6.350.0110.00314.56
5.6.340.0080.00314.56
5.6.330.0120.00314.52
5.6.320.0030.01014.55
5.6.310.0040.01314.74
5.6.300.0000.01314.70
5.6.290.0000.00914.47
5.6.280.0020.02217.79
5.6.270.0030.00714.64
5.6.260.0060.00614.31
5.6.250.0060.00614.71
5.6.240.0000.01614.38
5.6.230.0030.00914.59
5.6.220.0070.00714.67
5.6.210.0070.04117.60
5.6.200.0070.04816.38
5.6.190.0030.05217.58
5.6.180.0170.04217.56
5.6.170.0190.02717.61
5.6.160.0060.02117.35
5.6.150.0030.02516.46
5.6.140.0070.04216.41
5.6.130.0080.04416.48
5.6.120.0050.04517.77
5.6.110.0070.03717.77
5.6.100.0020.05117.63
5.6.90.0100.04317.74
5.6.80.0050.04817.59
5.6.70.0000.01114.26
5.6.60.0030.00714.45
5.6.50.0060.00614.32
5.6.40.0110.00014.30
5.6.30.0050.00514.40
5.6.20.0030.01014.30
5.6.10.0000.00914.51
5.6.00.0100.00314.29
5.5.380.0000.01111.23
5.5.370.0070.00411.51
5.5.360.0030.00611.32
5.5.350.0170.03415.86
5.5.340.0100.04114.60
5.5.330.0070.04515.90
5.5.320.0280.04115.87
5.5.310.0130.04015.86
5.5.300.0090.03714.69
5.5.290.0070.02914.64
5.5.280.0110.03616.10
5.5.270.0070.02316.10
5.5.260.0020.04516.08
5.5.250.0080.02315.67
5.5.240.0050.03415.73
5.5.230.0030.00310.88
5.5.220.0030.00511.34
5.5.210.0000.00811.13
5.5.200.0060.00611.30
5.5.190.0000.01011.18
5.5.180.0030.00711.23
5.5.170.0000.01010.92
5.5.160.0100.00311.41
5.5.150.0070.00311.44
5.5.140.0070.00711.50
5.5.130.0070.00311.20
5.5.120.0030.00911.16
5.5.110.0030.00311.28
5.5.100.0050.00511.31
5.5.90.0080.00511.24
5.5.80.0030.00711.24
5.5.70.0080.00511.13
5.5.60.0050.00310.81
5.5.50.0040.00411.29
5.5.40.0050.00511.26
5.5.30.0040.00411.10
5.5.20.0100.00011.01
5.5.10.0060.00310.77
5.5.00.0070.00310.76

preferences:
53.08 ms | 401 KiB | 5 Q