3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testme { public static function foo(&$ref) { $ref = 1; } } class Invoker { public static function invoke($func_name) { $trace = debug_backtrace(); $args = &$trace[0]['args']; call_user_func_array(array('Testme', $func_name), array_slice($args,1)); } } $test = 2; $testRef = &$test; Invoker::invoke('foo', $testRef); var_dump($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.40.0060.01318.79
8.3.30.0100.00319.04
8.3.20.0030.00520.16
8.3.10.0040.00421.98
8.3.00.0040.00422.39
8.2.170.0070.01022.96
8.2.160.0050.00820.84
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0060.00319.36
8.2.110.0100.00020.54
8.2.100.0100.00317.91
8.2.90.0050.00319.09
8.2.80.0000.00818.05
8.2.70.0000.00817.75
8.2.60.0040.00418.16
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0000.00718.14
8.2.20.0040.00417.79
8.2.10.0000.00819.56
8.2.00.0040.00417.87
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0050.00520.84
8.1.230.0040.00719.03
8.1.220.0050.00317.78
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0030.00517.52
8.1.180.0040.00418.10
8.1.170.0040.00418.69
8.1.160.0040.00722.02
8.1.150.0000.00718.65
8.1.140.0040.00417.46
8.1.130.0040.00417.71
8.1.120.0000.00717.52
8.1.110.0000.00717.42
8.1.100.0000.00717.46
8.1.90.0030.00317.48
8.1.80.0040.00417.43
8.1.70.0030.00317.34
8.1.60.0030.00617.56
8.1.50.0000.00817.50
8.1.40.0080.00017.52
8.1.30.0080.00017.55
8.1.20.0000.00817.55
8.1.10.0030.00517.57
8.1.00.0030.00617.50
8.0.300.0040.00418.77
8.0.290.0000.00817.18
8.0.280.0030.00318.35
8.0.270.0000.00817.17
8.0.260.0030.00616.76
8.0.250.0030.00317.09
8.0.240.0000.00817.02
8.0.230.0020.00516.97
8.0.220.0050.00216.92
8.0.210.0080.00016.98
8.0.200.0000.00616.95
8.0.190.0000.00717.04
8.0.180.0040.00416.85
8.0.170.0040.00416.98
8.0.160.0050.00316.90
8.0.150.0040.00416.92
8.0.140.0090.00016.88
8.0.130.0080.00013.47
8.0.120.0080.00016.87
8.0.110.0000.00716.94
8.0.100.0030.00516.98
8.0.90.0000.00716.89
8.0.80.0060.01716.89
8.0.70.0040.00316.91
8.0.60.0040.00416.85
8.0.50.0030.00516.79
8.0.30.0070.01217.25
8.0.20.0070.01317.40
8.0.10.0000.00716.96
8.0.00.0070.01216.86
7.4.330.0050.00015.08
7.4.320.0000.00616.62
7.4.300.0000.00616.62
7.4.290.0030.00316.43
7.4.280.0040.00416.59
7.4.270.0030.00316.50
7.4.260.0030.00316.59
7.4.250.0060.00316.42
7.4.240.0020.00516.54
7.4.230.0030.00316.63
7.4.220.0170.00716.64
7.4.210.0080.00716.58
7.4.200.0070.00016.60
7.4.190.0030.00316.60
7.4.160.0130.00616.43
7.4.150.0100.00717.40
7.4.140.0100.01317.86
7.4.130.0120.00716.52
7.4.120.0140.00616.69
7.4.110.0120.00916.63
7.4.100.0170.00716.55
7.4.90.0050.01916.58
7.4.80.0100.00716.49
7.4.70.0160.00316.45
7.4.60.0060.00916.48
7.4.50.0060.00016.71
7.4.40.0030.01322.77
7.4.30.0080.00816.67
7.4.00.0040.01115.05
7.3.330.0060.00013.27
7.3.320.0020.00213.43
7.3.310.0030.00316.27
7.3.300.0000.00716.39
7.3.290.0090.00616.39
7.3.280.0070.01016.47
7.3.270.0070.01017.40
7.3.260.0060.01216.34
7.3.250.0090.01016.48
7.3.240.0100.00716.59
7.3.230.0120.00916.55
7.3.210.0040.01416.63
7.3.200.0150.00619.39
7.3.190.0100.01316.43
7.3.180.0030.01216.51
7.3.170.0000.01616.48
7.3.160.0030.01316.61
7.3.120.0030.01014.93
7.2.330.0080.00816.45
7.2.320.0060.01516.67
7.2.310.0130.00316.30
7.2.300.0110.01116.79
7.2.290.0030.01316.71
7.2.60.0100.00316.67
7.2.00.0090.00419.21
7.1.200.0030.00915.71
7.1.100.0070.00317.97
7.1.70.0000.00816.97
7.1.60.0040.00919.82
7.1.50.0060.00616.91
7.1.00.0070.07322.31
7.0.200.0060.00616.71
7.0.140.0070.06722.07
7.0.100.0030.08019.93
7.0.90.0230.07020.01
7.0.80.0100.07319.99
7.0.70.0130.07020.01
7.0.60.0070.08319.96
7.0.50.0070.08720.26
7.0.40.0100.08020.08
7.0.30.0070.09020.15
7.0.20.0070.08020.05
7.0.10.0030.06319.95
7.0.00.0130.08320.17
5.6.280.0000.07720.99
5.6.250.0030.04320.78
5.6.240.0230.06020.55
5.6.230.0030.08020.59
5.6.220.0100.07320.64
5.6.210.0030.08320.77
5.6.200.0130.05320.95
5.6.190.0170.04721.13
5.6.180.0070.09021.11
5.6.170.0030.07721.11
5.6.160.0170.07021.15
5.6.150.0170.07321.09
5.6.140.0070.08321.05
5.6.130.0100.08021.04
5.6.120.0100.06321.13
5.6.110.0030.08321.10
5.6.100.0130.07321.02
5.6.90.0030.08720.93
5.6.80.0030.08020.41
5.6.70.0070.05020.34
5.6.60.0100.06320.46
5.6.50.0030.08320.35
5.6.40.0030.08020.39
5.6.30.0100.07720.31
5.6.20.0100.07720.41
5.6.10.0030.07720.39
5.6.00.0170.07020.45
5.5.380.0030.08020.36
5.5.370.0130.07320.47
5.5.360.0030.08320.36
5.5.350.0100.07720.45
5.5.340.0130.07720.92
5.5.330.0130.07720.91
5.5.320.0100.08020.95
5.5.310.0170.06320.86
5.5.300.0100.08020.82
5.5.290.0130.04720.82
5.5.280.0070.07020.80
5.5.270.0070.08320.92
5.5.260.0030.05320.88
5.5.250.0170.07020.45
5.5.240.0100.07320.25
5.5.230.0130.07720.30
5.5.220.0170.06720.29
5.5.210.0000.08720.29
5.5.200.0100.07720.12
5.5.190.0170.06720.23
5.5.180.0130.06720.09
5.5.160.0070.06319.96
5.5.150.0070.07320.18
5.5.140.0130.05720.07
5.5.130.0100.07320.26
5.5.120.0070.07720.22
5.5.110.0100.07320.17
5.5.100.0130.07320.11
5.5.90.0070.06719.98
5.5.80.0100.06320.00
5.5.70.0200.05720.09
5.5.60.0100.07320.02
5.5.50.0100.07020.12
5.5.40.0100.07019.99
5.5.30.0130.07320.08
5.5.20.0100.07720.03
5.5.10.0070.07720.00
5.5.00.0070.08020.09
5.4.450.0030.07719.19
5.4.440.0070.08319.22
5.4.430.0030.07719.55
5.4.420.0130.06719.55
5.4.410.0070.05719.24
5.4.400.0130.07019.17
5.4.390.0030.08019.03
5.4.380.0070.08319.20
5.4.370.0030.07719.05
5.4.360.0130.07018.95
5.4.350.0000.08019.17
5.4.340.0070.07319.12
5.4.320.0030.07718.95
5.4.310.0100.04718.95
5.4.300.0130.05019.03
5.4.290.0070.07318.90
5.4.280.0100.06319.17
5.4.270.0070.04719.04
5.4.260.0030.07719.12
5.4.250.0070.07719.13
5.4.240.0030.08019.04
5.4.230.0100.04319.04
5.4.220.0170.06319.02
5.4.210.0100.06718.89
5.4.200.0030.07019.21
5.4.190.0170.07018.89
5.4.180.0130.07319.12
5.4.170.0070.06719.07
5.4.160.0070.07319.18
5.4.150.0100.07319.03
5.4.140.0030.07716.32
5.4.130.0000.06716.51
5.4.120.0100.06716.30
5.4.110.0000.05016.48
5.4.100.0030.07716.56
5.4.90.0130.05016.48
5.4.80.0100.06716.43
5.4.70.0030.06316.46
5.4.60.0130.03716.48
5.4.50.0000.07316.46
5.4.40.0000.08016.52
5.4.30.0100.06016.24
5.4.20.0070.04016.47
5.4.10.0100.06716.31
5.4.00.0070.07015.89
5.3.290.0070.06714.71
5.3.280.0070.07714.58
5.3.270.0100.06714.54
5.3.260.0030.08014.56
5.3.250.0100.06714.67
5.3.240.0030.04714.54
5.3.230.0030.08014.53
5.3.220.0070.07714.55
5.3.210.0100.07314.64
5.3.200.0000.08014.53
5.3.190.0100.07014.71
5.3.180.0030.07714.66
5.3.170.0070.07314.50
5.3.160.0070.07014.71
5.3.150.0100.07314.68
5.3.140.0000.08014.59
5.3.130.0000.08314.51
5.3.120.0100.06714.61
5.3.110.0000.08014.48
5.3.100.0030.07314.00
5.3.90.0070.07014.00
5.3.80.0070.06714.00
5.3.70.0030.07714.05
5.3.60.0100.07313.94
5.3.50.0030.07314.05
5.3.40.0170.06013.84
5.3.30.0030.08013.90
5.3.20.0070.06713.69
5.3.10.0100.06713.79
5.3.00.0070.07013.57
5.2.170.0100.05711.06
5.2.160.0000.06011.08
5.2.150.0030.05311.18
5.2.140.0130.02711.28
5.2.130.0030.06311.03
5.2.120.0070.03711.14
5.2.110.0100.05311.17
5.2.100.0000.06711.09
5.2.90.0030.05711.00
5.2.80.0030.06010.98
5.2.70.0030.04311.01
5.2.60.0000.06311.17
5.2.50.0070.04711.04
5.2.40.0030.06010.91
5.2.30.0000.03710.87
5.2.20.0000.06710.88
5.2.10.0070.05710.92
5.2.00.0000.06310.84
5.1.60.0070.05310.15
5.1.50.0070.02710.15
5.1.40.0000.05310.15
5.1.30.0030.05710.21
5.1.20.0130.05010.28
5.1.10.0130.04010.15
5.1.00.0070.05310.16
5.0.50.0030.04310.15
5.0.40.0030.02710.15
5.0.30.0030.06310.15
5.0.20.0000.03710.15
5.0.10.0070.04010.15
5.0.00.0070.03310.15
4.4.90.0030.03710.15
4.4.80.0000.03710.15
4.4.70.0000.03710.15
4.4.60.0030.03010.15
4.4.50.0000.03310.15
4.4.40.0000.05310.15
4.4.30.0000.03710.15
4.4.20.0030.03310.15
4.4.10.0000.03710.15
4.4.00.0000.05010.15
4.3.110.0030.03310.15
4.3.100.0000.03710.15
4.3.90.0030.02310.15
4.3.80.0000.04710.15
4.3.70.0100.02710.15
4.3.60.0070.02710.15
4.3.50.0030.04310.15
4.3.40.0030.03310.15
4.3.30.0000.04010.15
4.3.20.0030.03010.15
4.3.10.0030.03010.15
4.3.00.0000.03710.15

preferences:
42.69 ms | 400 KiB | 5 Q