3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x extends ArrayObject { public function offsetGet($key) { static $i = 0; $i++; if ($i == 1) return $this[$key]; else return 'bla';} public function __get($key) { static $i = 0; $i++; if ($i == 1) return $this->$key; else return 'bla';} } $x = new x(); //var_dump($x['test']); var_dump($x->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)
8.3.60.0130.00316.75
8.3.50.0160.00717.40
8.3.40.0060.00918.92
8.3.30.0140.00018.78
8.3.20.0040.00418.73
8.3.10.0040.00418.78
8.3.00.0000.00819.51
8.2.180.0000.01516.88
8.2.170.0040.01122.96
8.2.160.0140.00418.91
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00719.54
8.2.110.0040.00719.35
8.2.100.0090.00317.97
8.2.90.0030.00619.09
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0000.00817.93
8.2.50.0040.00417.80
8.2.40.0080.00019.35
8.2.30.0110.00017.70
8.2.20.0030.00617.81
8.2.10.0060.00317.73
8.2.00.0080.00017.75
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.76
8.1.230.0030.00917.89
8.1.220.0050.00317.79
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0030.00517.38
8.1.180.0030.00618.10
8.1.170.0040.00417.62
8.1.160.0000.00819.07
8.1.150.0040.00418.60
8.1.140.0000.00717.45
8.1.130.0040.00419.19
8.1.120.0000.00717.45
8.1.110.0030.00517.35
8.1.100.0020.00517.43
8.1.90.0000.00717.37
8.1.80.0000.00717.30
8.1.70.0040.00417.49
8.1.60.0040.00417.61
8.1.50.0070.00017.58
8.1.40.0040.00417.54
8.1.30.0050.00317.65
8.1.20.0000.00917.69
8.1.10.0000.00717.61
8.1.00.0000.00817.52
8.0.300.0040.00418.77
8.0.290.0060.00316.61
8.0.280.0000.00718.57
8.0.270.0070.00017.14
8.0.260.0030.00316.87
8.0.250.0030.00917.00
8.0.240.0000.00717.03
8.0.230.0070.00017.07
8.0.220.0030.00616.84
8.0.210.0030.00316.93
8.0.200.0030.00316.89
8.0.190.0030.00716.92
8.0.180.0070.00017.00
8.0.170.0060.00316.97
8.0.160.0040.00416.93
8.0.150.0050.00316.90
8.0.140.0000.00816.89
8.0.130.0000.00613.45
8.0.120.0030.00616.92
8.0.110.0000.00717.02
8.0.100.0040.00416.87
8.0.90.0000.00816.91
8.0.80.0000.01417.00
8.0.70.0000.00716.99
8.0.60.0000.00816.78
8.0.50.0030.00516.86
8.0.30.0070.01017.31
8.0.20.0100.00816.82
8.0.10.0070.00017.09
8.0.00.0120.00716.65
7.4.330.0020.00213.00
7.4.320.0000.00716.52
7.4.300.0030.00316.59
7.4.290.0030.00516.52
7.4.280.0070.00316.42
7.4.270.0030.00316.63
7.4.260.0030.00313.33
7.4.250.0030.00516.59
7.4.240.0070.00016.48
7.4.230.0000.00816.58
7.4.220.0120.00616.46
7.4.210.0030.01316.58
7.4.200.0070.00016.40
7.4.190.0040.00416.75
7.4.160.0030.01216.50
7.4.150.0110.00716.54
7.4.140.0090.01017.86
7.4.130.0150.00916.54
7.4.120.0130.00316.45
7.4.110.0090.00916.58
7.4.100.0030.01316.70
7.4.90.0090.00916.39
7.4.80.0100.00819.39
7.4.70.0060.01116.67
7.4.60.0030.01316.55
7.4.50.0060.00316.50
7.4.40.0080.00316.45
7.4.30.0060.01116.71
7.4.00.0030.01314.82
7.3.330.0060.00013.43
7.3.320.0050.00013.36
7.3.310.0070.00016.52
7.3.300.0030.00316.40
7.3.290.0110.00316.39
7.3.280.0030.01516.39
7.3.270.0260.02316.61
7.3.260.0070.01116.70
7.3.240.0060.00916.40
7.3.230.0140.00316.59
7.3.210.0060.01116.66
7.3.200.0070.01016.67
7.3.190.0030.01316.43
7.3.180.0060.01016.36
7.3.170.0040.01616.63
7.3.160.0130.00316.36
7.3.120.0070.01014.61
7.3.10.0060.00616.63
7.3.00.0090.00616.58
7.2.330.0090.01616.57
7.2.320.0030.01516.55
7.2.310.0070.01016.74
7.2.300.0090.01216.70
7.2.290.0190.00716.66
7.2.130.0060.00616.86
7.2.120.0090.00916.69
7.2.110.0080.00416.99
7.2.100.0100.00317.00
7.2.90.0030.00916.67
7.2.80.0070.00516.90
7.2.70.0100.00316.75
7.2.60.0060.00816.92
7.2.50.0060.00617.05
7.2.40.0060.01217.02
7.2.30.0120.00617.01
7.2.20.0090.00616.84
7.2.10.0040.00716.62
7.2.00.0050.00618.13
7.1.250.0070.00315.79
7.1.200.0090.00615.57
7.1.100.0000.01118.01
7.1.70.0000.00817.24
7.1.60.0100.01419.21
7.1.50.0070.01316.78
7.1.00.0000.07322.39
7.0.200.0030.00516.50
7.0.140.0000.07721.94
7.0.120.0000.07722.12
7.0.60.0000.04319.92
7.0.50.0000.04317.88
7.0.40.0100.07020.26
7.0.30.0300.08020.07
7.0.20.0300.07320.21
7.0.10.0200.04320.13
7.0.00.0130.08320.20
5.6.280.0030.07321.05
5.6.210.0030.05720.57
5.6.200.0170.06718.18
5.6.190.0070.08720.63
5.6.180.0330.06720.56
5.6.170.0270.06720.56
5.6.160.0030.05320.55
5.6.150.0070.08718.16
5.6.140.0070.08018.21
5.6.130.0270.07018.21
5.6.120.0070.07321.01
5.6.110.0130.07721.13
5.6.100.0030.06321.01
5.6.90.0130.05721.11
5.6.80.0030.08320.44
5.6.70.0330.06720.44
5.5.350.0130.09020.53
5.5.340.0100.05718.04
5.5.330.0070.06020.40
5.5.320.0430.04020.35
5.5.310.0200.04020.37
5.5.300.0100.07318.01
5.5.290.0030.04318.04
5.5.280.0130.08320.85
5.5.270.0000.05020.90
5.5.260.0030.04720.73
5.5.250.0100.07320.72
5.5.240.0130.06320.08
5.4.450.0130.06319.41
5.4.440.0130.06319.47
5.4.430.0100.08019.47
5.4.420.0030.08019.18
5.4.410.0130.06719.04
5.4.400.0070.04019.25
5.4.390.0070.04019.12
5.4.380.0070.07719.14
5.4.370.0170.06319.15
5.4.360.0070.05719.21
5.4.350.0070.06319.15
5.4.340.0100.07018.92
5.4.320.0170.07018.98
5.4.310.0000.08018.87
5.4.300.0100.05319.12
5.4.290.0100.06018.92
5.4.280.0170.04019.23
5.4.270.0070.06719.14
5.4.260.0100.06019.24
5.4.250.0130.07018.87
5.4.240.0000.07719.00
5.4.230.0070.08018.84
5.4.220.0000.08719.23
5.4.210.0070.07318.85
5.4.200.0100.07018.84
5.4.190.0070.07018.95
5.4.180.0070.07718.96
5.4.170.0000.05719.11
5.4.160.0070.03719.22
5.4.150.0000.05018.83
5.4.140.0030.07316.56
5.4.130.0100.03016.35
5.4.120.0100.04016.37
5.4.110.0100.07316.53
5.4.100.0130.06716.30
5.4.90.0170.06316.43
5.4.80.0070.07016.39
5.4.70.0070.04716.42
5.4.60.0130.06716.43
5.4.50.0100.07316.35
5.4.40.0130.06316.43
5.4.30.0070.05016.40
5.4.20.0030.07716.31
5.4.10.0070.04716.36
5.4.00.0000.04315.86
5.3.290.0100.06714.74
5.3.280.0000.06314.60
5.3.270.0130.06714.76
5.3.260.0070.07314.66
5.3.250.0100.07014.66
5.3.240.0030.04314.53
5.3.230.0070.04314.63
5.3.220.0030.03714.73
5.3.210.0130.07014.59
5.3.200.0030.07714.63
5.3.190.0030.08314.73
5.3.180.0070.07714.62
5.3.170.0030.07714.57
5.3.160.0000.07714.59
5.3.150.0130.07314.60
5.3.140.0130.05314.48
5.3.130.0070.06014.61
5.3.120.0030.07014.56
5.3.110.0100.07014.71
5.3.100.0070.04014.10
5.3.90.0070.06314.10
5.3.80.0000.05314.03
5.3.70.0030.04014.04
5.3.60.0100.05714.01
5.3.50.0070.04314.03
5.3.40.0100.07314.12
5.3.30.0070.06013.99
5.3.20.0070.08013.59
5.3.10.0000.06313.63
5.3.00.0070.07313.67
5.2.170.0000.03711.16
5.2.160.0000.06711.05
5.2.150.0070.05711.17
5.2.140.0070.03311.19
5.2.130.0000.06311.04
5.2.120.0030.03711.16
5.2.110.0000.05011.07
5.2.100.0000.04711.16
5.2.90.0000.03711.03
5.2.80.0030.05311.05
5.2.70.0070.06311.05
5.2.60.0070.05711.21
5.2.50.0000.04311.06
5.2.40.0030.04011.00
5.2.30.0070.03710.97
5.2.20.0100.02711.01
5.2.10.0000.05710.84
5.2.00.0070.04710.64
5.1.60.0030.03710.00
5.1.50.0100.04310.07
5.1.40.0000.0379.95
5.1.30.0000.03010.38
5.1.20.0030.04010.36
5.1.10.0000.03010.07
5.1.00.0070.04010.07
5.0.50.0030.0308.85
5.0.40.0030.0378.85
5.0.30.0070.0608.85
5.0.20.0000.0478.85
5.0.10.0070.0338.85
5.0.00.0030.0578.85
4.4.90.0000.0238.85
4.4.80.0070.0178.85
4.4.70.0000.0278.85
4.4.60.0030.0208.85
4.4.50.0070.0308.85
4.4.40.0030.0478.85
4.4.30.0070.0138.85
4.4.20.0030.0178.85
4.4.10.0000.0378.85
4.4.00.0000.0378.85
4.3.110.0000.0308.85
4.3.100.0100.0408.85
4.3.90.0000.0378.85
4.3.80.0000.0408.85
4.3.70.0030.0278.85
4.3.60.0030.0178.85
4.3.50.0030.0178.85
4.3.40.0030.0238.85
4.3.30.0030.0338.85
4.3.20.0000.0238.85
4.3.10.0000.0208.85
4.3.00.0000.0178.85

preferences:
113.5 ms | 401 KiB | 5 Q