3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { private function test(&$ref) { $ref++; } public function __call($f, $a) { foreach ($a as $k => &$v); call_user_func_array(array($this, $f), $a); } } $x = 10; $a = new a(); $a->test($x); echo $x;

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.01018.31
8.3.50.0170.00522.05
8.3.40.0110.00718.75
8.3.30.0040.01119.04
8.3.20.0000.00720.33
8.3.10.0070.00023.64
8.3.00.0070.00019.16
8.2.180.0130.00316.38
8.2.170.0150.00022.96
8.2.160.0130.00322.28
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0050.00326.16
8.2.120.0050.00320.93
8.2.110.0140.00320.93
8.2.100.0090.00317.91
8.2.90.0050.00317.63
8.2.80.0040.00418.77
8.2.70.0000.00817.93
8.2.60.0030.00718.09
8.2.50.0000.00818.10
8.2.40.0050.00219.34
8.2.30.0000.00719.37
8.2.20.0030.00617.75
8.2.10.0020.00518.16
8.2.00.0040.00417.63
8.1.280.0140.00425.92
8.1.270.0030.00618.89
8.1.260.0100.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00321.03
8.1.230.0070.00417.76
8.1.220.0040.00417.78
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00718.84
8.1.180.0000.00818.96
8.1.170.0000.00818.33
8.1.160.0000.00718.96
8.1.150.0020.00518.95
8.1.140.0040.00417.50
8.1.130.0050.00317.79
8.1.120.0030.00317.46
8.1.110.0000.00717.36
8.1.100.0000.00717.46
8.1.90.0000.00717.48
8.1.80.0000.01117.46
8.1.70.0000.00717.31
8.1.60.0060.00317.57
8.1.50.0030.00617.52
8.1.40.0000.00717.39
8.1.30.0030.00717.66
8.1.20.0050.00217.64
8.1.10.0040.00417.57
8.1.00.0000.00717.55
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00818.45
8.0.270.0080.00017.25
8.0.260.0000.00617.25
8.0.250.0000.00717.02
8.0.240.0060.00316.97
8.0.230.0030.00316.83
8.0.220.0000.00716.91
8.0.210.0000.00816.82
8.0.200.0070.00016.97
8.0.190.0030.00516.95
8.0.180.0040.00416.82
8.0.170.0000.00716.80
8.0.160.0030.00516.82
8.0.150.0070.00016.86
8.0.140.0030.00516.74
8.0.130.0060.00013.33
8.0.120.0030.00616.87
8.0.110.0070.00016.73
8.0.100.0040.00416.78
8.0.90.0040.00416.72
8.0.80.0080.00616.95
8.0.70.0040.00416.72
8.0.60.0040.00416.77
8.0.50.0000.00816.76
8.0.30.0110.00816.98
8.0.20.0110.01217.40
8.0.10.0040.00416.90
8.0.00.0070.00916.84
7.4.330.0000.00515.20
7.4.320.0060.00016.60
7.4.300.0000.00616.66
7.4.290.0000.00716.61
7.4.280.0030.00516.61
7.4.270.0000.00816.61
7.4.260.0030.00316.60
7.4.250.0040.00416.54
7.4.240.0030.00416.52
7.4.230.0000.00716.50
7.4.220.0100.01916.51
7.4.210.0080.00616.55
7.4.200.0040.00416.70
7.4.160.0060.00916.71
7.4.150.0060.01217.40
7.4.140.0100.00817.86
7.4.130.0090.00816.52
7.4.120.0060.01016.44
7.4.110.0060.01716.47
7.4.100.0100.00716.62
7.4.90.0100.00716.43
7.4.80.0130.00319.39
7.4.70.0160.00316.73
7.4.60.0030.01316.36
7.4.50.0040.00416.55
7.4.40.0150.00416.51
7.4.30.0170.00516.44
7.4.00.0060.00614.66
7.3.330.0060.00013.28
7.3.320.0050.00013.33
7.3.310.0030.00316.29
7.3.300.0040.00416.27
7.3.290.0090.00716.29
7.3.280.0090.00816.27
7.3.270.0130.01017.40
7.3.260.0080.01116.51
7.3.250.0080.00916.45
7.3.240.0070.01016.48
7.3.230.0180.00316.39
7.3.210.0100.00716.66
7.3.200.0040.01519.39
7.3.190.0060.01016.56
7.3.180.0080.01316.48
7.3.170.0130.00716.48
7.3.160.0120.00316.36
7.2.330.0090.00916.54
7.2.320.0100.01016.79
7.2.310.0090.00916.66
7.2.300.0060.00916.79
7.2.290.0130.01016.82
7.2.00.0060.00919.60
7.1.200.0000.00715.92
7.1.100.0060.00618.46
7.1.70.0000.01217.34
7.1.60.0090.01519.22
7.1.50.0060.01517.13
7.1.00.0070.07022.27
7.0.200.0100.00016.51
7.0.140.0000.06322.09
7.0.60.0000.05720.02
7.0.50.0030.07317.88
7.0.40.0070.04020.13
7.0.30.0330.06720.26
7.0.20.0070.05020.21
7.0.10.0100.08020.14
7.0.00.0100.08020.20
5.6.280.0030.07320.84
5.6.210.0130.08320.55
5.6.200.0070.07718.25
5.6.190.0000.05020.48
5.6.180.0300.05020.48
5.6.170.0230.03320.40
5.6.160.0070.07320.43
5.6.150.0130.05018.14
5.6.140.0030.06018.19
5.6.130.0070.08718.24
5.6.120.0130.07021.02
5.6.110.0070.04320.98
5.6.100.0000.07020.89
5.6.90.0130.07320.93
5.6.80.0130.07720.28
5.5.350.0170.08020.39
5.5.340.0170.06718.04
5.5.330.0100.08320.47
5.5.320.0200.04020.35
5.5.310.0230.08320.34
5.5.300.0030.06317.97
5.5.290.0070.08318.04
5.5.280.0030.05720.86
5.5.270.0000.08320.97
5.5.260.0100.08320.86
5.5.250.0070.03720.68
5.5.240.0070.07720.15
5.4.450.0770.05719.29
5.4.440.0630.06319.53
5.4.430.0900.05019.32
5.4.420.0870.05019.53
5.4.410.0870.05719.45
5.4.400.0730.06019.22
5.4.390.0630.06718.91
5.4.380.0700.06018.51
5.4.370.0730.05718.73
5.4.360.0730.05718.84
5.4.350.0930.05318.79
5.4.340.0800.05318.75
5.4.320.0800.05718.49
5.4.310.0800.05018.83
5.4.300.0730.05018.47
5.4.290.0730.05318.80
5.4.280.0830.06018.62
5.4.270.0830.06318.46
5.4.260.0730.05718.73
5.4.250.0700.06018.49
5.4.240.0770.05318.78
5.4.230.0670.06318.60
5.4.220.0870.04018.79
5.4.210.0700.06018.51
5.4.200.0800.04316.55
5.4.190.0770.05018.57
5.4.180.0930.06318.59
5.4.170.0830.04718.73
5.4.160.0800.05318.78
5.4.150.0730.07018.54
5.4.140.0770.05316.22
5.4.130.0830.04016.33
5.4.120.0700.05316.31
5.4.110.0900.07016.44
5.4.100.1170.05316.23
5.4.90.0870.07716.21
5.4.80.0770.06316.31
5.4.70.0770.05016.30
5.4.60.0770.05016.23
5.4.50.0800.04716.26
5.4.40.0770.05716.18
5.4.30.0830.04316.18
5.4.20.0800.04716.25
5.4.10.0770.04716.25
5.4.00.0770.04715.65
5.3.290.0770.05714.69
5.3.280.0830.05314.61
5.3.270.0730.05014.59
5.3.260.0900.04014.59
5.3.250.0730.06314.64
5.3.240.0730.05714.75
5.3.230.0730.05714.63
5.3.220.1000.04314.79
5.3.210.0870.06014.68
5.3.200.0930.05014.60
5.3.190.1030.04714.62
5.3.180.1030.05714.61
5.3.170.0900.06714.61
5.3.160.1000.06014.74
5.3.150.1070.04714.59
5.3.140.1070.05014.75
5.3.130.0930.05314.55
5.3.120.0900.05314.61
5.3.110.0830.06014.62
5.3.100.1000.05314.26
5.3.90.0870.05314.08
5.3.80.0930.05014.25
5.3.70.1130.06314.05
5.3.60.0870.05714.11
5.3.50.1100.06314.12
5.3.40.0970.05314.16
5.3.30.1070.07013.91
5.3.20.0870.05313.86
5.3.10.0970.04313.70
5.3.00.0930.05013.63
5.2.170.0800.04011.19
5.2.160.0670.04711.23
5.2.150.0700.04711.22
5.2.140.0800.04311.13
5.2.130.0930.03711.14
5.2.120.0700.04311.23
5.2.110.0570.04711.19
5.2.100.0570.04711.22
5.2.90.0600.04311.21
5.2.80.0670.04011.16
5.2.70.0770.04711.21
5.2.60.0730.04311.18
5.2.50.0770.04311.25
5.2.40.0770.04311.02
5.2.30.0670.04011.11
5.2.20.0700.04711.01
5.2.10.0600.04010.97
5.2.00.0570.04310.90
5.1.60.0600.03310.13
5.1.50.0600.03710.04
5.1.40.0670.03010.00
5.1.30.0630.03310.32
5.1.20.0730.05010.45
5.1.10.0600.04310.28
5.1.00.0600.04310.28
5.0.50.0370.0238.59
5.0.40.0270.0338.55
5.0.30.0300.0478.33
5.0.20.0330.0238.23
5.0.10.0270.0308.21
5.0.00.0330.0438.21
4.4.90.0270.0276.00
4.4.80.0330.0335.96
4.4.70.0300.0236.02
4.4.60.0330.0205.89
4.4.50.0330.0175.88
4.4.40.0270.0375.98
4.4.30.0270.0235.89
4.4.20.0330.0205.98
4.4.10.0230.0235.96
4.4.00.0300.0335.91
4.3.110.0300.0235.85
4.3.100.0270.0235.84
4.3.90.0300.0235.84
4.3.80.0300.0375.89
4.3.70.0270.0235.83
4.3.60.0370.0135.80
4.3.50.0230.0305.81
4.3.40.0270.0335.76
4.3.30.0170.0205.05
4.3.20.0130.0235.05
4.3.10.0170.0205.05
4.3.00.0070.0237.60

preferences:
58.75 ms | 401 KiB | 5 Q