3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct() { $args = func_get_args(); switch (count($args)) { case 2: call_user_func_array(array($this, 'constr2'), $args); break; case 1: call_user_func_array(array($this, 'constr1'), $args); break; } throw new Exception("invalid number of arguments"); } protected function constr1($a) { print "constr1 called\n"; } protected function constr2($a, $b) { print "constr2 called\n"; } } $a = new Foo(2); $b = new Foo(2, 3); $c = new Foo("a", "b", 3);

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.0090.01218.53
8.3.50.0130.01021.10
8.3.40.0090.00618.74
8.3.30.0100.00618.84
8.3.20.0040.00420.32
8.3.10.0040.00423.54
8.3.00.0050.00223.66
8.2.180.0060.00925.92
8.2.170.0070.01119.00
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0020.00519.82
8.2.120.0000.00826.35
8.2.110.0060.00322.31
8.2.100.0030.00918.16
8.2.90.0000.00819.25
8.2.80.0000.00818.05
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00822.32
8.2.30.0000.00719.34
8.2.20.0040.00417.80
8.2.10.0000.00718.11
8.2.00.0040.00417.99
8.1.280.0160.00425.92
8.1.270.0080.00020.11
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0100.00023.77
8.1.230.0000.01219.21
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.36
8.1.180.0030.00518.10
8.1.170.0000.00818.64
8.1.160.0070.00020.77
8.1.150.0000.00818.94
8.1.140.0000.00819.47
8.1.130.0000.00817.61
8.1.120.0050.00217.49
8.1.110.0030.00517.32
8.1.100.0040.00417.39
8.1.90.0000.00817.40
8.1.80.0070.00017.53
8.1.70.0000.00717.35
8.1.60.0000.00817.55
8.1.50.0030.00617.57
8.1.40.0080.00017.55
8.1.30.0000.00817.55
8.1.20.0080.00017.65
8.1.10.0050.00317.44
8.1.00.0040.00417.50
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00818.39
8.0.270.0000.00716.88
8.0.260.0030.00317.26
8.0.250.0030.00317.04
8.0.240.0030.00317.01
8.0.230.0000.00717.01
8.0.220.0070.00016.85
8.0.210.0000.00816.86
8.0.200.0040.00417.01
8.0.190.0000.00916.98
8.0.180.0070.00017.02
8.0.170.0000.00816.99
8.0.160.0080.00016.87
8.0.150.0040.00416.84
8.0.140.0040.00416.80
8.0.130.0070.00013.39
8.0.120.0000.00816.93
8.0.110.0040.00416.90
8.0.100.0000.00716.86
8.0.90.0040.00416.99
8.0.80.0090.01216.91
8.0.70.0040.00416.93
8.0.60.0050.00316.84
8.0.50.0000.00716.79
8.0.30.0070.01317.04
8.0.20.0120.00717.40
8.0.10.0070.00017.12
8.0.00.0110.00916.88
7.4.330.0020.00216.89
7.4.320.0050.00216.60
7.4.300.0040.00416.65
7.4.290.0080.00016.54
7.4.280.0030.00616.51
7.4.270.0040.00416.56
7.4.260.0000.00716.50
7.4.250.0060.00316.54
7.4.240.0030.00516.57
7.4.230.0050.00216.63
7.4.220.0000.02316.55
7.4.210.0030.01016.54
7.4.200.0070.00016.50
7.4.160.0090.00616.57
7.4.150.0070.01117.40
7.4.140.0140.01117.86
7.4.130.0100.01216.56
7.4.120.0130.00916.50
7.4.110.0100.00716.61
7.4.100.0100.01316.50
7.4.90.0070.01016.54
7.4.80.0060.01219.39
7.4.70.0120.00616.64
7.4.60.0120.00616.50
7.4.50.0060.00916.39
7.4.40.0080.01216.59
7.4.30.0100.00716.48
7.4.00.0110.00414.98
7.3.330.0030.00313.39
7.3.320.0080.00013.31
7.3.310.0050.00216.23
7.3.300.0060.00016.18
7.3.290.0080.00716.33
7.3.280.0100.00916.33
7.3.270.0120.00917.40
7.3.260.0030.01316.44
7.3.250.0130.00416.47
7.3.240.0120.00816.52
7.3.230.0080.00816.59
7.3.210.0120.01216.33
7.3.200.0100.01319.39
7.3.190.0080.00916.43
7.3.180.0060.00916.55
7.3.170.0070.01016.53
7.3.160.0060.00916.39
7.2.330.0140.00616.70
7.2.320.0190.01216.49
7.2.310.0060.01016.77
7.2.300.0070.01016.73
7.2.290.0140.00616.75
7.2.60.0110.00417.00
7.2.00.0030.00719.19
7.1.200.0070.00715.85
7.1.100.0050.00818.06
7.1.70.0000.00717.02
7.1.60.0210.00619.20
7.1.50.0110.01116.71
7.1.00.0030.07322.46
7.0.200.0000.01016.53
7.0.60.0170.08721.77
7.0.50.0100.08017.95
7.0.40.0000.06020.30
7.0.30.0330.08320.19
7.0.20.0370.07020.31
7.0.10.0200.07720.07
7.0.00.0070.04720.18
5.6.280.0000.04021.10
5.6.210.0130.04020.48
5.6.200.0100.05318.16
5.6.190.0100.09020.50
5.6.180.0270.07020.33
5.6.170.0270.07320.71
5.6.160.0070.08320.58
5.6.150.0200.03718.16
5.6.140.0130.03018.19
5.6.130.0070.04018.15
5.6.120.0070.08721.14
5.6.110.0030.06321.03
5.6.100.0000.06020.96
5.6.90.0100.08021.04
5.6.80.0070.05720.43
5.5.350.0030.07020.42
5.5.340.0130.03318.05
5.5.330.0070.03720.27
5.5.320.0370.05720.32
5.5.310.0230.04720.23
5.5.300.0000.05717.98
5.5.290.0130.04317.96
5.5.280.0070.08020.96
5.5.270.0170.07720.76
5.5.260.0170.07020.87
5.5.250.0070.05320.62
5.5.240.0100.07720.34

preferences:
50.36 ms | 401 KiB | 5 Q