3v4l.org

run code in 300+ PHP versions simultaneously
<?php class r { protected $a = null; public function __construct($a){$this->a = $a;} public function add(){$this->a++;} public function getVal(){return $this->a;} } class a { private function test($ref) { $ref->add(); } public function __call($f, $a) { call_user_func_array(array($this, $f), $a); } } $x = new r(10); $a = new a(); $a->test($x); echo $x->getVal();

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.0070.01418.30
8.3.50.0140.00718.30
8.3.40.0150.00318.96
8.3.30.0140.00019.04
8.3.20.0000.00720.34
8.3.10.0050.00323.66
8.3.00.0070.00018.98
8.2.180.0060.01018.43
8.2.170.0090.00522.96
8.2.160.0070.01122.08
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00520.94
8.2.110.0040.00422.27
8.2.100.0030.00917.72
8.2.90.0060.00317.75
8.2.80.0060.00318.96
8.2.70.0030.00618.04
8.2.60.0030.00718.22
8.2.50.0080.00018.10
8.2.40.0040.00419.42
8.2.30.0000.00719.39
8.2.20.0040.00417.66
8.2.10.0070.00018.16
8.2.00.0070.00017.82
8.1.280.0090.00925.92
8.1.270.0090.00019.00
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0070.00423.91
8.1.230.0080.00420.92
8.1.220.0030.00517.78
8.1.210.0030.00618.77
8.1.200.0040.00717.34
8.1.190.0030.00619.02
8.1.180.0000.00819.03
8.1.170.0060.00318.46
8.1.160.0000.00819.00
8.1.150.0040.00418.80
8.1.140.0080.00017.45
8.1.130.0030.00317.69
8.1.120.0040.00417.48
8.1.110.0070.00017.46
8.1.100.0070.00017.50
8.1.90.0050.00217.50
8.1.80.0000.00817.46
8.1.70.0000.00717.44
8.1.60.0030.00617.63
8.1.50.0060.00317.54
8.1.40.0020.00517.56
8.1.30.0080.00317.48
8.1.20.0000.00817.57
8.1.10.0080.00017.48
8.1.00.0020.00517.50
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0070.00018.46
8.0.270.0070.00017.27
8.0.260.0030.00317.32
8.0.250.0030.00316.86
8.0.240.0080.00017.03
8.0.230.0000.00716.86
8.0.220.0000.00716.81
8.0.210.0000.00716.90
8.0.200.0030.00316.81
8.0.190.0030.00516.86
8.0.180.0000.00716.92
8.0.170.0070.00016.82
8.0.160.0070.00017.04
8.0.150.0070.00016.75
8.0.140.0040.00416.88
8.0.130.0030.00313.29
8.0.120.0060.00316.75
8.0.110.0080.00016.86
8.0.100.0040.00416.96
8.0.90.0000.00816.88
8.0.80.0050.01016.89
8.0.70.0040.00416.77
8.0.60.0070.00016.79
8.0.50.0050.00316.92
8.0.30.0140.00717.13
8.0.20.0130.01017.40
8.0.10.0000.00716.99
8.0.00.0040.01516.75
7.4.330.0050.00015.14
7.4.320.0000.00616.58
7.4.300.0030.00316.49
7.4.290.0070.00016.52
7.4.280.0050.00516.58
7.4.270.0080.00016.41
7.4.260.0070.00016.59
7.4.250.0060.00316.56
7.4.240.0040.00416.51
7.4.230.0040.00416.62
7.4.220.0120.00616.40
7.4.210.0090.00616.57
7.4.200.0040.00416.34
7.4.160.0040.01216.53
7.4.150.0190.00717.40
7.4.140.0130.00417.86
7.4.130.0070.01016.46
7.4.120.0110.01016.42
7.4.110.0120.01216.55
7.4.100.0120.00816.44
7.4.90.0110.00616.33
7.4.80.0110.01119.39
7.4.70.0090.00916.53
7.4.60.0160.00016.39
7.4.50.0030.00616.61
7.4.40.0200.00316.37
7.4.30.0070.01016.50
7.4.00.0100.00715.01
7.3.330.0020.00313.17
7.3.320.0050.00013.07
7.3.310.0000.00716.34
7.3.300.0070.00016.22
7.3.290.0040.01016.29
7.3.280.0080.00916.28
7.3.270.0070.01017.40
7.3.260.0140.00516.40
7.3.250.0120.00516.43
7.3.240.0100.00716.32
7.3.230.0090.00916.61
7.3.210.0040.01216.35
7.3.200.0080.00919.39
7.3.190.0130.01016.61
7.3.180.0120.00316.27
7.3.170.0140.00716.36
7.3.160.0000.01616.43
7.3.10.0130.00016.69
7.3.00.0060.00616.66
7.2.330.0120.00616.36
7.2.320.0100.01316.81
7.2.310.0070.01016.88
7.2.300.0060.00916.68
7.2.290.0130.01016.82
7.2.130.0030.01217.05
7.2.120.0040.00816.70
7.2.110.0080.00516.77
7.2.100.0090.00316.92
7.2.90.0030.01016.76
7.2.80.0070.01116.80
7.2.70.0030.00616.54
7.2.60.0040.01116.98
7.2.50.0030.01416.99
7.2.40.0100.00316.66
7.2.30.0040.00816.80
7.2.20.0030.01316.76
7.2.10.0090.00616.69
7.2.00.0020.00918.30
7.1.250.0040.00415.79
7.1.200.0040.00715.60
7.1.100.0040.00718.14
7.1.70.0000.01017.16
7.1.60.0110.01419.22
7.1.50.0090.01216.63
7.1.00.0070.07322.57
7.0.200.0030.00716.86
7.0.140.0000.07322.21
7.0.60.0000.04720.01
7.0.50.0030.05017.86
7.0.40.0100.03720.09
7.0.30.0300.07020.27
7.0.20.0200.03720.15
7.0.10.0070.05020.25
7.0.00.0070.08320.33
5.6.280.0030.07320.79
5.6.210.0000.07020.76
5.6.200.0070.08018.19
5.6.190.0030.09320.33
5.6.180.0300.05020.50
5.6.170.0270.03320.55
5.6.160.0170.04020.52
5.6.150.0070.07018.23
5.6.140.0070.06718.11
5.6.130.0030.04318.21
5.6.120.0100.07721.04
5.6.110.0070.09021.02
5.6.100.0170.06320.89
5.6.90.0030.08021.13
5.6.80.0030.08020.39
5.5.350.0170.06320.47
5.5.340.0100.07317.98
5.5.330.0070.09020.47
5.5.320.0200.06720.42
5.5.310.0230.05720.52
5.5.300.0100.03317.98
5.5.290.0130.03718.06
5.5.280.0100.07720.66
5.5.270.0030.05320.89
5.5.260.0130.05720.89
5.5.250.0070.03720.60
5.5.240.0100.07720.04
5.4.450.0870.04319.55
5.4.440.0770.05719.43
5.4.430.0670.05019.22
5.4.420.1130.05719.28
5.4.410.0800.04719.45
5.4.400.0770.05319.16
5.4.390.0100.05719.18
5.4.380.0200.05018.63
5.4.370.0130.05718.79
5.4.360.0130.05318.48
5.4.350.0130.05718.61
5.4.340.0130.06018.63
5.4.320.0130.05718.76
5.4.310.0100.05718.63
5.4.300.0100.05718.80
5.4.290.0270.05318.75
5.4.280.0230.05018.77
5.4.270.0170.05318.53
5.4.260.0170.05318.74
5.4.250.0100.06318.70
5.4.240.0200.05018.47
5.4.230.0130.05718.73
5.4.220.0230.05018.55
5.4.210.0230.06018.77
5.4.200.0170.05316.63
5.4.190.0300.05018.82
5.4.180.0270.04318.71
5.4.170.0200.05318.61
5.4.160.0200.05018.48
5.4.150.0230.06018.61
5.4.140.0270.04016.46
5.4.130.0130.05316.42
5.4.120.0100.05716.45
5.4.110.0200.05016.23
5.4.100.0270.04716.32
5.4.90.0130.05716.46
5.4.80.0200.05316.16
5.4.70.0230.04716.14
5.4.60.0200.05016.33
5.4.50.0130.05316.27
5.4.40.0200.05016.16
5.4.30.0230.04716.14
5.4.20.0170.07016.21
5.4.10.0230.04716.38
5.4.00.0230.04015.71
5.3.290.0100.06014.73
5.3.280.0100.06014.82
5.3.270.0170.05314.84
5.3.260.0130.06014.83
5.3.250.0270.05014.67
5.3.240.0200.04714.63
5.3.230.0330.03714.62
5.3.220.0100.05714.57
5.3.210.0170.05314.68
5.3.200.0170.05014.59
5.3.190.0130.05714.67
5.3.180.0030.06314.57
5.3.170.0100.05714.61
5.3.160.0200.04714.64
5.3.150.0200.04714.61
5.3.140.0200.05014.55
5.3.130.0270.04314.59
5.3.120.0200.04714.68
5.3.110.0170.05314.53
5.3.100.0070.06314.25
5.3.90.0170.05714.08
5.3.80.0230.04314.14
5.3.70.0130.05314.07
5.3.60.0200.04314.07
5.3.50.0100.05714.18
5.3.40.0130.05314.12
5.3.30.0230.04314.05
5.3.20.0200.04713.80
5.3.10.0100.05313.77
5.3.00.0200.04713.70
5.2.170.0200.05011.28
5.2.160.0200.03311.19
5.2.150.0200.03311.18
5.2.140.0130.04011.18
5.2.130.0100.04011.18
5.2.120.0070.04311.21
5.2.110.0030.04711.23
5.2.100.0170.03311.22
5.2.90.0170.03711.34
5.2.80.0170.03711.15
5.2.70.0100.04311.32
5.2.60.0300.03311.27
5.2.50.0170.03711.13
5.2.40.0070.04711.04
5.2.30.0230.03711.02
5.2.20.0100.05011.04
5.2.10.0100.04011.07
5.2.00.0200.03310.76
5.1.60.0100.0339.98
5.1.50.0170.03310.09
5.1.40.0100.03710.11
5.1.30.0070.04010.41
5.1.20.0130.03710.57
5.1.10.0200.03010.25
5.1.00.0070.03710.12
5.0.50.0030.0308.65
5.0.40.0030.0308.52
5.0.30.0130.0378.36
5.0.20.0130.0208.28
5.0.10.0100.0238.22
5.0.00.0170.0338.35
4.4.90.0070.0235.94
4.4.80.0070.0205.97
4.4.70.0070.0206.00
4.4.60.0030.0235.88
4.4.50.0070.0205.89
4.4.40.0030.0375.89
4.4.30.0000.0275.98
4.4.20.0100.0176.05
4.4.10.0000.0275.97
4.4.00.0030.0375.98
4.3.110.0030.0305.89
4.3.100.0100.0175.84
4.3.90.0100.0175.86
4.3.80.0070.0335.91
4.3.70.0100.0175.79
4.3.60.0100.0175.78
4.3.50.0100.0175.78
4.3.40.0100.0305.75
4.3.30.0030.0205.01
4.3.20.0000.0275.01
4.3.10.0000.0275.01
4.3.00.0100.0237.60

preferences:
49.65 ms | 400 KiB | 5 Q