3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $_a = 6; function __get($key) { if($key == 'stuff') { return $this->stuff(); } else if($key == 'a') { return $this->_a; } } function stuff() { return array('random' => 'key', 'using_getter' => 10 * $this->a); } } $test = new test(); print 'this should be 60: '.$test->stuff['using_getter'].PHP_EOL; print 'this should be 6: '.$test->a.PHP_EOL;

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.0100.00718.43
8.3.50.0050.01421.23
8.3.40.0070.00718.79
8.3.30.0140.00018.84
8.3.20.0040.00420.21
8.3.10.0020.00521.81
8.3.00.0000.00823.66
8.2.180.0070.00716.75
8.2.170.0080.00622.96
8.2.160.0100.00320.52
8.2.150.0070.00025.66
8.2.140.0090.00624.66
8.2.130.0040.00419.71
8.2.120.0050.00326.35
8.2.110.0000.00922.29
8.2.100.0120.00017.93
8.2.90.0030.00519.35
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0080.00022.33
8.2.30.0050.00320.68
8.2.20.0040.00417.84
8.2.10.0040.00418.18
8.2.00.0040.00418.02
8.1.280.0120.00325.92
8.1.270.0040.00423.84
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0100.00023.81
8.1.230.0040.00719.10
8.1.220.0030.00517.74
8.1.210.0030.00518.77
8.1.200.0000.01117.36
8.1.190.0050.00217.35
8.1.180.0040.00918.10
8.1.170.0040.00418.65
8.1.160.0040.00420.63
8.1.150.0000.00718.79
8.1.140.0040.00419.58
8.1.130.0040.00417.64
8.1.120.0050.00217.42
8.1.110.0000.00817.34
8.1.100.0040.00417.45
8.1.90.0000.00717.35
8.1.80.0000.00717.43
8.1.70.0000.00717.33
8.1.60.0030.00617.62
8.1.50.0000.00817.52
8.1.40.0000.00817.34
8.1.30.0060.00317.62
8.1.20.0000.00817.52
8.1.10.0000.00717.58
8.1.00.0000.00717.56
8.0.300.0040.00418.77
8.0.290.0020.00516.75
8.0.280.0050.00218.43
8.0.270.0070.00017.36
8.0.260.0000.00617.24
8.0.250.0030.00316.98
8.0.240.0060.00016.91
8.0.230.0030.00316.91
8.0.220.0040.00416.87
8.0.210.0070.00016.76
8.0.200.0060.00016.96
8.0.190.0050.00316.98
8.0.180.0040.00416.91
8.0.170.0030.00516.92
8.0.160.0050.00316.75
8.0.150.0040.00316.79
8.0.140.0030.00416.84
8.0.130.0050.00013.27
8.0.120.0040.00416.88
8.0.110.0070.00016.76
8.0.100.0000.00716.67
8.0.90.0000.00816.84
8.0.80.0090.01016.93
8.0.70.0020.00516.71
8.0.60.0040.00416.71
8.0.50.0040.00416.77
8.0.30.0070.01117.00
8.0.20.0100.00917.40
8.0.10.0050.00217.01
8.0.00.0100.00716.74
7.4.330.0030.00316.79
7.4.320.0060.00016.54
7.4.300.0060.00016.56
7.4.290.0030.00516.63
7.4.280.0000.01016.47
7.4.270.0070.00016.59
7.4.260.0030.00316.57
7.4.250.0030.00316.51
7.4.240.0020.00516.61
7.4.230.0000.00816.62
7.4.220.0100.00616.54
7.4.210.0080.00716.51
7.4.200.0030.00316.59
7.4.160.0060.01016.42
7.4.150.0170.00317.40
7.4.140.0160.00517.86
7.4.130.0120.00516.50
7.4.120.0100.00716.52
7.4.110.0110.01116.42
7.4.100.0150.00616.47
7.4.90.0110.00716.45
7.4.80.0130.01019.39
7.4.70.0030.01216.49
7.4.60.0100.00616.46
7.4.50.0030.01416.34
7.4.40.0150.00616.46
7.4.30.0090.00916.45
7.4.00.0030.01215.05
7.3.330.0030.00313.36
7.3.320.0030.00313.35
7.3.310.0000.00716.21
7.3.300.0000.00816.32
7.3.290.0050.00216.41
7.3.280.0090.00816.31
7.3.270.0100.00717.40
7.3.260.0140.00416.35
7.3.250.0110.00916.51
7.3.240.0100.01016.52
7.3.230.0120.00616.49
7.3.210.0100.00716.30
7.3.200.0120.00616.32
7.3.190.0130.00316.57
7.3.180.0140.00316.48
7.3.170.0070.01016.44
7.3.160.0110.00516.44
7.3.120.0000.01514.81
7.3.110.0060.00914.82
7.3.100.0100.00314.69
7.3.90.0090.00314.93
7.3.80.0100.00614.98
7.3.70.0030.00914.92
7.3.60.0000.01114.86
7.3.50.0060.00914.94
7.3.40.0130.00314.70
7.3.30.0130.00014.92
7.3.20.0030.01216.58
7.3.10.0000.01116.67
7.3.00.0000.01116.69
7.2.330.0060.01116.88
7.2.320.0070.01116.80
7.2.310.0070.01216.83
7.2.300.0130.00316.84
7.2.290.0090.00616.68
7.2.240.0030.01615.09
7.2.230.0040.01115.18
7.2.220.0030.00915.10
7.2.210.0030.01315.38
7.2.200.0120.00615.05
7.2.190.0030.01214.85
7.2.180.0040.01115.05
7.2.170.0100.00615.04
7.2.160.0030.01014.73
7.2.150.0000.01516.82
7.2.140.0090.00617.15
7.2.130.0040.01416.66
7.2.120.0000.01617.07
7.2.110.0080.00817.02
7.2.100.0060.00916.76
7.2.90.0060.01217.00
7.2.80.0060.00616.79
7.2.70.0060.01017.14
7.2.60.0090.00416.74
7.2.50.0060.00616.91
7.2.40.0000.01517.14
7.2.30.0090.00617.14
7.2.20.0030.01316.96
7.2.10.0030.01216.97
7.2.00.0040.00918.07
7.1.330.0000.01315.76
7.1.320.0070.01015.75
7.1.310.0040.00815.99
7.1.300.0060.00615.65
7.1.290.0080.00415.44
7.1.280.0060.01015.99
7.1.270.0080.00415.80
7.1.260.0070.00715.82
7.1.250.0000.01315.78
7.1.200.0100.00715.77
7.1.100.0000.00918.19
7.1.70.0080.00317.18
7.1.60.0040.01819.27
7.1.50.0030.02116.96
7.1.00.0030.07322.46
7.0.200.0070.00316.88
7.0.60.0070.07721.83
7.0.50.0100.04717.86
7.0.40.0130.05020.34
7.0.30.0130.04320.23
7.0.20.0330.07020.07
7.0.10.0100.08320.09
7.0.00.0000.05020.23
5.6.280.0030.03321.13
5.6.210.0070.06320.67
5.6.200.0000.04318.27
5.6.190.0170.06320.41
5.6.180.0300.07020.77
5.6.170.0270.05320.56
5.6.160.0100.06020.57
5.6.150.0130.07318.27
5.6.140.0030.04018.11
5.6.130.0070.03718.28
5.6.120.0000.04321.11
5.6.110.0030.09020.96
5.6.100.0070.08321.04
5.6.90.0070.07321.03
5.6.80.0130.07720.54
5.5.350.0070.08320.33
5.5.340.0130.07317.98
5.5.330.0170.07720.25
5.5.320.0200.04020.33
5.5.310.0230.04020.37
5.5.300.0030.06017.97
5.5.290.0100.04017.98
5.5.280.0030.04020.77
5.5.270.0070.04320.77
5.5.260.0100.08320.65
5.5.250.0000.04320.69
5.5.240.0100.03020.28

preferences:
66.88 ms | 401 KiB | 5 Q