3v4l.org

run code in 300+ PHP versions simultaneously
<?php class f { function f(&$e, &$u, $f=false) { } } function getNew() { $a = func_get_args(); $c = array_shift($a); // foreach ($a as $k => &$value) // $a[$k] = $value; //return call_user_func_array(array('f', 'f'), $c); $r = new ReflectionClass($c); return $r->newInstanceArgs($a); } $e = new stdClass; $u = new stdClass; var_dump(getNew('f', $e, $u));

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.01018.31
8.3.50.0110.00921.15
8.3.40.0040.01518.84
8.3.30.0110.00320.34
8.3.20.0090.00020.46
8.3.10.0040.00421.16
8.3.00.0040.00423.46
8.2.180.0170.00316.88
8.2.170.0100.00722.96
8.2.160.0090.00620.55
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00721.13
8.2.110.0090.00019.33
8.2.100.0080.00417.79
8.2.90.0060.00319.23
8.2.80.0050.00318.03
8.2.70.0070.00317.50
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0040.00418.03
8.2.30.0030.00519.31
8.2.20.0000.00817.65
8.2.10.0040.00417.74
8.2.00.0050.00217.73
8.1.280.0120.00325.92
8.1.270.0040.00423.99
8.1.260.0090.00626.35
8.1.250.0080.00028.09
8.1.240.0040.00722.40
8.1.230.0110.00020.99
8.1.220.0040.00418.77
8.1.210.0030.00618.85
8.1.200.0100.00317.13
8.1.190.0000.00817.52
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0000.00718.95
8.1.150.0000.01018.64
8.1.140.0040.00417.42
8.1.130.0070.00017.73
8.1.120.0000.00717.52
8.1.110.0030.00317.36
8.1.100.0040.00417.41
8.1.90.0000.00717.43
8.1.80.0030.00317.48
8.1.70.0030.00317.41
8.1.60.0040.00417.62
8.1.50.0000.00717.42
8.1.40.0000.00717.46
8.1.30.0000.00817.56
8.1.20.0040.00417.63
8.1.10.0040.00417.59
8.1.00.0000.00817.50
8.0.300.0040.00419.82
8.0.290.0030.00617.15
8.0.280.0000.00718.56
8.0.270.0040.00417.20
8.0.260.0030.00316.81
8.0.250.0050.00317.03
8.0.240.0030.00317.02
8.0.230.0030.00317.06
8.0.220.0000.00716.96
8.0.210.0000.00816.93
8.0.200.0000.00616.91
8.0.190.0000.00816.89
8.0.180.0000.00717.02
8.0.170.0040.00417.00
8.0.160.0000.00717.03
8.0.150.0030.00316.85
8.0.140.0050.00316.90
8.0.130.0000.00513.39
8.0.120.0050.00316.90
8.0.110.0070.00016.98
8.0.100.0000.00716.86
8.0.90.0040.00416.95
8.0.80.0060.01017.01
8.0.70.0040.00416.86
8.0.60.0040.00416.91
8.0.50.0000.00816.74
8.0.30.0050.01317.01
8.0.20.0130.00617.40
8.0.10.0080.00017.14
8.0.00.0120.01016.67
7.4.330.0000.00516.77
7.4.320.0030.00516.61
7.4.300.0060.00016.61
7.4.290.0040.00416.49
7.4.280.0000.00816.42
7.4.270.0030.00316.46
7.4.260.0050.00013.26
7.4.250.0000.00716.61
7.4.240.0050.00216.59
7.4.230.0040.00416.60
7.4.220.0090.00616.61
7.4.210.0050.01116.58
7.4.200.0050.00216.34
7.4.190.0000.00716.41
7.4.160.0060.00916.48
7.4.150.0070.01017.40
7.4.140.0130.00717.86
7.4.130.0050.01416.44
7.4.120.0100.00716.50
7.4.110.0140.00316.54
7.4.100.0110.00716.63
7.4.90.0130.00316.65
7.4.80.0040.01519.39
7.4.70.0130.00316.56
7.4.60.0100.01016.48
7.4.50.0030.00316.62
7.4.40.0070.00722.77
7.4.30.0080.01316.52
7.4.00.0040.01414.71
7.3.330.0020.00213.42
7.3.320.0050.00013.44
7.3.310.0030.00316.23
7.3.300.0030.00316.38
7.3.290.0190.00016.44
7.3.280.0110.00616.38
7.3.270.0210.00317.40
7.3.260.0110.00918.24
7.3.250.0120.00516.47
7.3.240.0080.00816.35
7.3.230.0080.00816.39
7.3.210.0150.00416.51
7.3.200.0110.00719.39
7.3.190.0070.01016.34
7.3.180.0070.01416.39
7.3.170.0080.00816.37
7.3.160.0090.00616.50
7.3.120.0050.00514.66
7.3.10.0040.01116.57
7.3.00.0000.01516.55
7.2.330.0090.01216.57
7.2.320.0130.00316.56
7.2.310.0120.00616.53
7.2.300.0130.00316.63
7.2.290.0080.00816.36
7.2.130.0080.00316.47
7.2.120.0130.00016.61
7.2.110.0070.00416.75
7.2.100.0040.00817.02
7.2.90.0030.01016.86
7.2.80.0060.00616.69
7.2.70.0030.01416.68
7.2.60.0040.00916.84
7.2.50.0030.01116.92
7.2.40.0120.00316.91
7.2.30.0000.01416.73
7.2.20.0070.00716.58
7.2.10.0030.00717.07
7.2.00.0070.00618.13
7.1.250.0030.00915.81
7.1.200.0030.00915.77
7.1.100.0070.00318.21
7.1.70.0030.00717.25
7.1.60.0110.01119.17
7.1.50.0060.01617.07
7.1.00.0030.03722.44
7.0.200.0030.00316.60
7.0.140.0070.06722.11
7.0.60.0070.06719.81
7.0.50.0000.04317.88
7.0.40.0070.08720.11
7.0.30.0500.08020.11
7.0.20.0100.05020.05
7.0.10.0370.07020.07
7.0.00.0030.05320.06
5.6.280.0130.06321.02
5.6.210.0030.08720.61
5.6.200.0070.04018.15
5.6.190.0100.08720.61
5.6.180.0230.08020.67
5.6.170.0270.07720.45
5.6.160.0100.07720.61
5.6.150.0070.06018.29
5.6.140.0070.08318.15
5.6.130.0030.05718.14
5.6.120.0070.05721.10
5.6.110.0070.03721.00
5.6.100.0070.05021.09
5.6.90.0070.06321.14
5.6.80.0100.07320.37
5.6.70.0270.06720.51
5.5.350.0200.07720.31
5.5.340.0100.07017.98
5.5.330.0030.09020.38
5.5.320.0300.07720.21
5.5.310.0200.06020.36
5.5.300.0070.07017.98
5.5.290.0100.03317.93
5.5.280.0130.08020.90
5.5.270.0130.07720.87
5.5.260.0100.07020.67
5.5.250.0070.08020.50
5.5.240.0100.06020.11
5.4.450.0230.04719.20
5.4.440.0230.08019.46
5.4.430.0300.06719.56
5.4.420.0270.04719.21
5.4.410.0300.07319.19
5.4.400.0370.05319.14
5.4.390.0230.03318.98
5.4.380.0230.07019.06
5.4.370.0270.04019.15
5.4.360.0330.06719.09
5.4.350.0330.06019.08
5.4.340.0300.04319.15
5.4.320.0130.06318.85
5.4.310.0170.04719.16
5.4.300.0200.04318.98
5.4.290.0300.04319.07
5.4.280.0200.04019.13
5.4.270.0230.07019.24
5.4.260.0200.05018.99
5.4.250.0330.03319.15
5.4.240.0170.04018.87
5.4.230.0170.04318.84
5.4.220.0230.07319.16
5.4.210.0330.06318.88
5.4.200.0270.03319.08
5.4.190.0230.05319.22
5.4.180.0230.04719.08
5.4.170.0230.07018.88
5.4.160.0200.07719.07
5.4.150.0100.08719.23
5.4.140.0270.06316.55
5.4.130.0300.06016.55
5.4.120.0200.07016.50
5.4.110.0370.06716.61
5.4.100.0300.05016.32
5.4.90.0100.04716.31
5.4.80.0230.04316.39
5.4.70.0270.06316.49
5.4.60.0230.05716.54
5.4.50.0130.06316.51
5.4.40.0230.05316.42
5.4.30.0170.03716.42
5.4.20.0230.06716.53
5.4.10.0200.05016.32
5.4.00.0230.06715.99
5.3.290.0230.07314.59
5.3.280.0200.05014.68
5.3.270.0230.03714.59
5.3.260.0130.05714.69
5.3.250.0170.04714.70
5.3.240.0230.07014.77
5.3.230.0330.06314.50
5.3.220.0200.07714.49
5.3.210.0230.04714.49
5.3.200.0130.08014.49
5.3.190.0230.07014.55
5.3.180.0230.04314.73
5.3.170.0270.05714.65
5.3.160.0230.06014.54
5.3.150.0330.06314.68
5.3.140.0230.05014.50
5.3.130.0270.03314.67
5.3.120.0130.06014.57
5.3.110.0170.06014.42
5.3.100.0230.07314.26
5.3.90.0330.06313.92
5.3.80.0200.05014.18
5.3.70.0270.07013.94
5.3.60.0230.07014.01
5.3.50.0230.05013.88
5.3.40.0300.03313.88
5.3.30.0270.04713.82
5.3.20.0270.06713.93
5.3.10.0230.07013.68
5.3.00.0230.04713.55
5.2.170.0200.04713.14
5.2.160.0230.02313.14
5.2.150.0200.03313.14
5.2.140.0170.05313.14
5.2.130.0270.04713.14
5.2.120.0170.05013.14
5.2.110.0230.05713.14
5.2.100.0170.04713.14
5.2.90.0130.03313.14
5.2.80.0170.05013.14
5.2.70.0170.02713.14
5.2.60.0170.03313.14
5.2.50.0170.03713.14
5.2.40.0100.04013.14
5.2.30.0130.04013.14
5.2.20.0100.06313.14
5.2.10.0130.05013.14
5.2.00.0170.03713.14
5.1.60.0230.03013.14
5.1.50.0200.05013.14
5.1.40.0230.04713.14
5.1.30.0170.05313.14
5.1.20.0170.03313.14
5.1.10.0100.04313.14
5.1.00.0130.04713.14
5.0.50.0070.04713.14
5.0.40.0100.04313.14
5.0.30.0070.05013.14
5.0.20.0130.01713.14
5.0.10.0130.03313.14
5.0.00.0100.04313.14
4.4.90.0030.03013.14
4.4.80.0070.03713.14
4.4.70.0130.03013.14
4.4.60.0100.02013.14
4.4.50.0100.03313.14
4.4.40.0100.05713.14
4.4.30.0170.03013.14
4.4.20.0200.02313.14
4.4.10.0070.02013.14
4.4.00.0100.05313.14
4.3.110.0070.03713.14
4.3.100.0130.03013.14
4.3.90.0100.03313.14
4.3.80.0030.03013.14
4.3.70.0100.03313.14
4.3.60.0070.02713.14
4.3.50.0070.03313.14
4.3.40.0070.05013.14
4.3.30.0030.04013.14
4.3.20.0070.03713.14
4.3.10.0000.03013.14
4.3.00.0030.03713.14

preferences:
45.71 ms | 401 KiB | 5 Q