3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $bar; public function __construct() { $this->bar = new bar(); } public function & __get($key) { $bar = $this->bar; return $bar; } } class bar { public $onBaz = []; } $foo = new foo(); $foo->bar->onBaz[] = function() {}; var_dump($foo->bar->onBaz);

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.00718.43
8.3.50.0140.00521.94
8.3.40.0070.00718.71
8.3.30.0030.01018.96
8.3.20.0000.00720.33
8.3.10.0040.00423.48
8.3.00.0040.00422.32
8.2.180.0150.00325.92
8.2.170.0100.00322.96
8.2.160.0030.01122.20
8.2.150.0030.00524.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00817.63
8.2.110.0030.00620.89
8.2.100.0000.01119.28
8.2.90.0030.00520.46
8.2.80.0020.00520.41
8.2.70.0000.00818.00
8.2.60.0060.00318.16
8.2.50.0000.00818.10
8.2.40.0040.00419.47
8.2.30.0000.00718.19
8.2.20.0040.00417.81
8.2.10.0040.00418.05
8.2.00.0050.00318.17
8.1.280.0100.01325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.14
8.1.230.0080.00422.63
8.1.220.0000.00817.74
8.1.210.0040.00418.88
8.1.200.0060.00317.48
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0000.00818.38
8.1.160.0050.00218.93
8.1.150.0040.00418.90
8.1.140.0030.00517.36
8.1.130.0030.00317.72
8.1.120.0070.00017.48
8.1.110.0080.00017.37
8.1.100.0000.00817.48
8.1.90.0070.00017.32
8.1.80.0050.00317.41
8.1.70.0000.00717.50
8.1.60.0090.00017.47
8.1.50.0100.00317.41
8.1.40.0050.00317.40
8.1.30.0050.00317.43
8.1.20.0030.00617.65
8.1.10.0040.00417.56
8.1.00.0030.00617.53
8.0.300.0040.00420.05
8.0.290.0030.00616.63
8.0.280.0040.00418.38
8.0.270.0030.00717.93
8.0.260.0000.00717.11
8.0.250.0070.00016.88
8.0.240.0030.00616.86
8.0.230.0030.00316.91
8.0.220.0050.00216.84
8.0.210.0070.00016.79
8.0.200.0030.00316.91
8.0.190.0060.00316.98
8.0.180.0040.00416.92
8.0.170.0060.00316.94
8.0.160.0030.00416.86
8.0.150.0040.00416.93
8.0.140.0070.00016.86
8.0.130.0030.00313.28
8.0.120.0000.00816.85
8.0.110.0040.00416.95
8.0.100.0040.00416.89
8.0.90.0050.00216.87
8.0.80.0040.01216.80
8.0.70.0090.00016.73
8.0.60.0000.00716.79
8.0.50.0040.00416.77
8.0.30.0040.01617.02
8.0.20.0100.01217.40
8.0.10.0050.00317.07
8.0.00.0140.00516.79
7.4.330.0000.00515.09
7.4.320.0000.00616.58
7.4.300.0000.00716.59
7.4.290.0080.00016.59
7.4.280.0040.00416.60
7.4.270.0030.00316.59
7.4.260.0000.00716.59
7.4.250.0040.00416.55
7.4.240.0050.00216.55
7.4.230.0030.00316.49
7.4.220.0000.00716.32
7.4.210.0060.01116.58
7.4.200.0030.00316.68
7.4.160.0170.00316.67
7.4.150.0190.00017.40
7.4.140.0110.00917.86
7.4.130.0040.01516.51
7.4.120.0100.00816.63
7.4.110.0030.01516.45
7.4.100.0150.00916.52
7.4.90.0100.01016.45
7.4.80.0120.01219.39
7.4.70.0130.00316.42
7.4.60.0070.01016.52
7.4.50.0000.00416.19
7.4.40.0060.01116.45
7.4.30.0070.01016.54
7.4.00.0030.01514.84
7.3.330.0030.00313.17
7.3.320.0050.00013.30
7.3.310.0070.00016.21
7.3.300.0070.00016.36
7.3.290.0000.00816.22
7.3.280.0080.01016.29
7.3.270.0100.00717.40
7.3.260.0070.01116.42
7.3.250.0110.00816.33
7.3.240.0090.00916.29
7.3.230.0090.00916.40
7.3.210.0130.00416.27
7.3.200.0040.01316.25
7.3.190.0120.01616.32
7.3.180.0090.00616.31
7.3.170.0120.00916.42
7.3.160.0100.01316.38
7.2.330.0100.00716.70
7.2.320.0030.01416.72
7.2.310.0070.01016.48
7.2.300.0000.01716.57
7.2.290.0120.00616.54
7.2.80.0030.00616.23
7.2.60.0070.00416.57
7.1.200.0110.00415.70
7.1.70.0030.00517.18
7.1.60.0150.01119.40
7.1.50.0060.01916.93
7.1.00.0100.07022.31
7.0.200.0100.01014.87
7.0.60.0130.08020.01
7.0.50.0030.08317.84
7.0.40.0070.09020.05
7.0.30.0300.05020.34
7.0.20.0230.04720.24
7.0.10.0030.08720.13
7.0.00.0230.04020.05
5.6.280.0070.03721.16
5.6.210.0030.04320.70
5.6.200.0070.06018.23
5.6.190.0030.07720.61
5.6.180.0030.07020.61
5.6.170.0400.06720.46
5.6.160.0030.06020.57
5.6.150.0030.04718.23
5.6.140.0100.08018.14
5.6.130.0030.08018.28
5.6.120.0100.04020.98
5.6.110.0000.06321.02
5.6.100.0100.07721.00
5.6.90.0170.07020.89
5.6.80.0130.07020.41
5.6.70.4300.04020.51
5.5.350.0300.07720.31
5.5.340.0030.04318.08
5.5.330.0100.08020.38
5.5.320.0200.04320.25
5.5.310.0530.06320.30
5.5.300.0100.07717.92
5.5.290.0070.05317.98
5.5.280.0000.04320.84
5.5.270.0100.08020.77
5.5.260.0000.04320.77
5.5.250.0070.08020.69
5.5.240.0200.08020.38
5.4.450.0800.06019.56
5.4.440.0100.06319.46
5.4.430.0100.06719.30
5.4.420.0300.04019.45
5.4.410.0130.05719.48
5.4.400.0270.04719.37
5.4.390.0200.05319.06
5.4.380.0300.04019.29
5.4.370.0100.06319.37
5.4.360.0200.05319.27
5.4.350.0130.05319.15
5.4.340.0200.04719.28
5.4.320.0230.05019.36
5.4.310.0130.05319.25
5.4.300.0270.04319.14
5.4.290.0270.04319.05
5.4.280.0100.06319.28
5.4.270.0270.04719.14
5.4.260.0170.05319.11
5.4.250.0200.05319.28
5.4.240.0200.05719.28
5.4.230.0270.05019.14
5.4.220.0230.06719.02
5.4.210.0230.05319.14
5.4.200.0200.06317.06
5.4.190.0200.05318.97
5.4.180.0230.07718.97
5.4.170.0270.05019.02
5.4.160.0200.05718.96
5.4.150.0300.04318.85
5.4.140.0130.07716.48
5.4.130.0230.06316.45
5.4.120.0270.05316.30
5.4.110.0230.04316.72
5.4.100.0300.05016.37
5.4.90.0400.04716.72
5.4.80.0270.05716.31
5.4.70.0070.06316.43
5.4.60.0130.05716.34
5.4.50.0230.04316.34
5.4.40.0100.06016.34
5.4.30.0230.04716.48
5.4.20.0170.05716.36
5.4.10.0130.05316.33
5.4.00.0130.05015.87
5.3.290.0130.06014.58
5.3.280.0170.06714.62
5.3.270.0200.07014.59
5.3.260.0130.05714.61
5.3.250.0070.05314.52
5.3.240.0100.07314.59
5.3.230.0370.05014.57
5.3.220.0100.05314.58
5.3.210.0170.05314.56
5.3.200.0200.04714.43
5.3.190.0230.04314.58
5.3.180.0230.04714.43
5.3.170.0100.05714.56
5.3.160.0100.05714.54
5.3.150.0330.05014.58
5.3.140.0200.04714.61
5.3.130.0270.04314.46
5.3.120.0130.05714.47
5.3.110.0100.06314.45
5.3.100.0030.06714.29
5.3.90.0170.05313.86
5.3.80.0170.04714.07
5.3.70.0070.05314.04
5.3.60.0200.04314.06
5.3.50.0100.05314.17
5.3.40.0100.05313.86
5.3.30.0300.03713.92
5.3.20.0170.04713.71
5.3.10.0170.06013.59
5.3.00.0300.04713.79
5.2.170.0230.03011.07
5.2.160.0030.04711.05
5.2.150.0300.04011.11
5.2.140.0130.04011.06
5.2.130.0130.04711.02
5.2.120.0170.05011.12
5.2.110.0200.03311.02
5.2.100.0070.04311.16
5.2.90.0130.03711.25
5.2.80.0070.04711.10
5.2.70.0030.05011.00
5.2.60.0100.04311.00
5.2.50.0170.04310.99
5.2.40.0100.04311.05
5.2.30.0170.05310.89
5.2.20.0100.04011.04
5.2.10.0200.03010.92
5.2.00.0130.03710.64
5.1.60.0130.0379.84
5.1.50.0030.05310.01
5.1.40.0100.03310.21
5.1.30.0070.04310.26
5.1.20.0170.03310.27
5.1.10.0200.02710.13
5.1.00.0130.03310.13
5.0.50.0030.0338.54
5.0.40.0070.0338.33
5.0.30.0130.0538.16
5.0.20.0170.0208.18
5.0.10.0170.0338.25
5.0.00.0100.0438.14
4.4.90.0070.0205.84
4.4.80.0100.0175.82
4.4.70.0100.0235.94
4.4.60.0100.0175.84
4.4.50.0030.0235.89
4.4.40.0070.0375.75
4.4.30.0030.0235.84
4.4.20.0030.0235.93
4.4.10.0030.0305.86
4.4.00.0030.0375.87
4.3.110.0070.0205.73
4.3.100.0070.0205.80
4.3.90.0070.0205.76
4.3.80.0070.0305.76
4.3.70.0070.0205.75
4.3.60.0070.0205.67
4.3.50.0070.0235.75
4.3.40.0070.0335.69
4.3.30.0030.0234.52
4.3.20.0030.0234.44
4.3.10.0000.0274.47
4.3.00.0100.0237.09

preferences:
62.06 ms | 401 KiB | 5 Q