3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testme { public static function foo(&$ref, &$ref2) { $ref = 1; $ref2 = 2; } } class Invoker { public static function invoke($func_name, &$arg1 = null, &$arg2 = null, &$arg3 = null, &$arg4 = null, &$arg5 = null, &$arg6 = null) { $argc = func_num_args(); $args = array(); for($i = 1; $i < $argc; $i++) { $name = 'arg' . $i; if ($$name !== null) { $args[] = &$$name; } } call_user_func_array(array('Testme', $func_name), $args); } } $test = 5; $test2 = 6; Invoker::invoke('foo', $test, $test2); var_dump($test); var_dump($test2);

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.00018.54
8.3.50.0040.01118.04
8.3.40.0090.00918.96
8.3.30.0100.00319.27
8.3.20.0080.00020.21
8.3.10.0040.00423.66
8.3.00.0060.00322.46
8.2.180.0110.00416.50
8.2.170.0070.01122.96
8.2.160.0030.01022.30
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0060.00322.18
8.2.100.0040.00817.78
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0030.00517.63
8.2.60.0080.00018.05
8.2.50.0050.00318.07
8.2.40.0030.00618.34
8.2.30.0000.00818.21
8.2.20.0030.00517.73
8.2.10.0000.00717.75
8.2.00.0040.00417.70
8.1.270.0060.00323.84
8.1.260.0000.00726.35
8.1.250.0100.00328.09
8.1.240.0030.00623.96
8.1.230.0070.00419.02
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00817.43
8.1.180.0030.00618.10
8.1.170.0060.00318.50
8.1.160.0000.00822.02
8.1.150.0040.00418.60
8.1.140.0030.00617.47
8.1.130.0030.00317.83
8.1.120.0030.00417.54
8.1.110.0050.00317.49
8.1.100.0050.00317.54
8.1.90.0070.00017.39
8.1.80.0000.00717.46
8.1.70.0030.00317.39
8.1.60.0000.00817.64
8.1.50.0000.00717.42
8.1.40.0030.00517.48
8.1.30.0060.00317.52
8.1.20.0090.00017.61
8.1.10.0040.00417.48
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0000.00718.46
8.0.270.0030.00317.28
8.0.260.0000.00816.76
8.0.250.0030.00316.96
8.0.240.0050.00316.94
8.0.230.0000.00816.94
8.0.220.0050.00416.86
8.0.210.0030.00316.94
8.0.200.0000.00616.83
8.0.190.0000.00716.98
8.0.180.0040.00416.94
8.0.170.0050.00216.98
8.0.160.0030.00516.89
8.0.150.0000.00716.83
8.0.140.0000.00716.85
8.0.130.0000.00613.34
8.0.120.0000.00716.85
8.0.110.0000.00716.85
8.0.100.0040.00416.75
8.0.90.0000.00816.87
8.0.80.0000.01416.88
8.0.70.0080.00016.95
8.0.60.0040.00416.73
8.0.50.0080.00016.77
8.0.30.0120.00717.07
8.0.20.0100.01017.40
8.0.10.0040.00417.06
8.0.00.0160.00616.77
7.4.330.0050.00015.03
7.4.320.0030.00316.52
7.4.300.0030.00316.58
7.4.290.0030.00316.52
7.4.280.0030.00316.52
7.4.270.0030.00316.51
7.4.260.0040.00416.59
7.4.250.0040.00416.54
7.4.240.0040.00416.58
7.4.230.0070.00016.72
7.4.220.0140.00416.61
7.4.210.0080.00716.59
7.4.200.0040.00416.26
7.4.190.0070.00016.43
7.4.160.0030.01816.55
7.4.150.0080.01117.40
7.4.140.0120.00617.86
7.4.130.0060.01116.43
7.4.120.0060.01116.61
7.4.110.0060.01116.56
7.4.100.0130.00616.45
7.4.90.0100.00716.43
7.4.80.0000.01916.57
7.4.70.0100.00616.59
7.4.60.0060.01116.47
7.4.50.0060.00316.38
7.4.40.0030.01322.77
7.4.30.0100.00716.45
7.4.00.0000.01215.02
7.3.330.0000.00513.34
7.3.320.0030.00313.41
7.3.310.0000.00716.42
7.3.300.0050.00216.37
7.3.290.0030.01316.34
7.3.280.0070.01116.32
7.3.270.0070.01717.40
7.3.260.0170.00716.63
7.3.250.0060.01116.57
7.3.240.0070.00916.46
7.3.230.0060.01216.40
7.3.210.0070.01016.55
7.3.200.0120.00619.39
7.3.190.0060.01416.45
7.3.180.0090.00616.20
7.3.170.0140.00216.44
7.3.160.0030.01316.44
7.3.120.0070.00714.87
7.2.330.0100.00616.81
7.2.320.0090.00916.50
7.2.310.0070.01016.68
7.2.300.0040.01216.77
7.2.290.0090.01216.49
7.2.00.0060.00919.52
7.1.100.0030.01017.89
7.1.70.0000.00717.10
7.1.60.0150.00919.24
7.1.50.0040.00716.86
7.1.00.0000.08022.48
7.0.200.0220.00616.61
7.0.140.0070.07022.21
7.0.100.0130.07019.90
7.0.90.0030.06719.86
7.0.80.0230.08020.03
7.0.70.0100.07019.92
7.0.60.0100.05019.93
7.0.50.0070.08020.36
7.0.40.0000.04320.07
7.0.30.0000.07720.05
7.0.20.0030.04720.04
7.0.10.0100.07020.07
7.0.00.0070.07020.10
5.6.280.0070.07020.83
5.6.250.0070.03720.72
5.6.240.0030.07020.70
5.6.230.0030.08320.70
5.6.220.0070.06720.50
5.6.210.0100.06720.57
5.6.200.0000.08021.06
5.6.190.0070.04721.14
5.6.180.0070.07021.01
5.6.170.0170.03321.03
5.6.160.0070.05721.04
5.6.150.0070.08321.11
5.6.140.0030.06721.08
5.6.130.0130.05020.96
5.6.120.0030.08021.04
5.6.110.0070.06720.95
5.6.100.0070.08021.03
5.6.90.0030.07021.12
5.6.80.0000.04020.44
5.6.70.0100.03720.46
5.6.60.0130.06320.41
5.6.50.0070.07320.50
5.6.40.0100.07320.47
5.6.30.0100.03720.39
5.6.20.0070.04020.32
5.6.10.0070.03320.30
5.6.00.0000.04020.39
5.5.380.0030.05020.41
5.5.370.0000.08020.43
5.5.360.0130.07020.44
5.5.350.0100.07020.43
5.5.340.0030.05320.74
5.5.330.0030.08020.91
5.5.320.0030.07320.65
5.5.310.0100.06020.64
5.5.300.0030.05720.83
5.5.290.0070.07320.92
5.5.280.0130.07720.80
5.5.270.0000.04720.84
5.5.260.0000.05720.86
5.5.250.0100.07720.65
5.5.240.0070.07320.20
5.5.230.0070.08720.15
5.5.220.0030.08020.21
5.5.210.0170.06720.25
5.5.200.0070.08020.25
5.5.190.0070.03720.18
5.5.180.0000.04320.23
5.5.160.0030.04020.16
5.5.150.0100.03720.24
5.5.140.0030.06020.15
5.5.130.0100.03020.21
5.5.120.0030.03320.17
5.5.110.0070.03320.26
5.5.100.0070.03719.96
5.5.90.0070.03320.16
5.5.80.0070.02719.98
5.5.70.0000.03720.04
5.5.60.0130.06720.04
5.5.50.0070.03320.09
5.5.40.0030.06320.05
5.5.30.0070.03020.14
5.5.20.0130.03320.07
5.5.10.0030.04020.08
5.5.00.0070.03720.06
5.4.450.0030.07019.49
5.4.440.0070.08319.36
5.4.430.0030.03719.22
5.4.420.0100.07719.36
5.4.410.0070.07319.40
5.4.400.0100.04019.13
5.4.390.0070.03319.18
5.4.380.0070.07019.16
5.4.370.0030.06718.91
5.4.360.0030.04019.12
5.4.350.0130.03018.85
5.4.340.0000.04019.14
5.4.320.0000.05019.12
5.4.310.0030.03319.05
5.4.300.0130.03019.14
5.4.290.0030.04019.20
5.4.280.0070.04319.02
5.4.270.0030.03719.02
5.4.260.0100.03018.92
5.4.250.0070.03018.92
5.4.240.0030.03019.20
5.4.230.0000.03719.17
5.4.220.0070.02719.15
5.4.210.0030.03719.20
5.4.200.0070.04319.04
5.4.190.0030.03019.04
5.4.180.0030.03719.11
5.4.170.0070.03319.08
5.4.160.0130.03718.88
5.4.150.0000.03718.88
5.4.140.0000.03316.47
5.4.130.0030.03716.38
5.4.120.0070.02716.41
5.4.110.0030.03016.48
5.4.100.0130.02316.40
5.4.90.0100.02316.52
5.4.80.0000.03316.48
5.4.70.0030.03316.54
5.4.60.0070.02716.46
5.4.50.0030.03016.41
5.4.40.0030.03016.35
5.4.30.0030.03316.46
5.4.20.0130.02016.31
5.4.10.0030.03016.43
5.4.00.0100.06015.87
5.3.290.0100.03014.64
5.3.280.0070.07714.55
5.3.270.0070.03714.59
5.3.260.0030.03714.75
5.3.250.0030.03014.75
5.3.240.0000.04014.60
5.3.230.0000.03714.74
5.3.220.0000.04314.52
5.3.210.0030.03014.71
5.3.200.0030.03314.59
5.3.190.0030.03314.60
5.3.180.0130.02314.62
5.3.170.0030.03314.68
5.3.160.0070.03014.50
5.3.150.0030.03014.63
5.3.140.0030.03314.49
5.3.130.0000.03314.50
5.3.120.0030.03014.62
5.3.110.0000.04014.48
5.3.100.0070.06314.11
5.3.90.0100.07013.96
5.3.80.0130.05713.95
5.3.70.0030.05714.03
5.3.60.0070.07013.94
5.3.50.0030.03713.98
5.3.40.0000.04314.09
5.3.30.0030.08013.84
5.3.20.0070.03313.75
5.3.10.0070.07013.59
5.3.00.0100.03713.54
5.2.170.0030.06311.29
5.2.160.0030.04711.01
5.2.150.0030.06311.05
5.2.140.0000.07011.20
5.2.130.0030.05711.17
5.2.120.0000.03711.22
5.2.110.0000.04010.99
5.2.100.0030.03311.16
5.2.90.0100.06311.01
5.2.80.0070.05011.11
5.2.70.0000.04011.16
5.2.60.0100.06011.09
5.2.50.0070.06011.02
5.2.40.0000.05010.91
5.2.30.0000.06710.86
5.2.20.0030.06711.09
5.2.10.0030.03011.01
5.2.00.0130.05010.59
5.1.60.0100.05710.07
5.1.50.0000.0539.99
5.1.40.0030.0539.93
5.1.30.0070.02710.21
5.1.20.0070.05310.48
5.1.10.0030.04710.14
5.1.00.0030.04310.07
5.0.50.0070.0409.59
5.0.40.0030.0379.59
5.0.30.0100.0509.59
5.0.20.0100.0339.59
5.0.10.0000.0239.59
5.0.00.0000.0709.59
4.4.90.0130.0239.59
4.4.80.0100.0179.59
4.4.70.0000.0309.59
4.4.60.0030.0179.59
4.4.50.0100.0309.59
4.4.40.0000.0279.59
4.4.30.0000.0239.59
4.4.20.0030.0339.59
4.4.10.0070.0139.59
4.4.00.0000.0339.59
4.3.110.0000.0379.59
4.3.100.0030.0279.59
4.3.90.0000.0239.59
4.3.80.0030.0539.59
4.3.70.0030.0139.59
4.3.60.0070.0309.59
4.3.50.0070.0309.59
4.3.40.0000.0279.59
4.3.30.0000.0209.59
4.3.20.0000.0339.59
4.3.10.0030.0309.59
4.3.00.0030.0209.59

preferences:
55.31 ms | 400 KiB | 5 Q