3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function Hello() { return 'Hello World!'; } } class PHP { public function ObjInvoke(...$args) { if(isset($args[0]) && !empty($args[0])) { $class = $args[0]; $string = '$obj = new '.$class; if(isset($args[1])) { $arguments = array_shift(array_shift($args)); $string .= '('.$args[1]; foreach($arguments as $arg) { $string .= ', '.$arg; } $string .= ')'; } $string .= ';'; echo($string); } else { throw new Exception('You must a define a class to set as object.'); } } } $obj = new PHP; $obj->ObjInvoke();

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.01416.63
8.3.50.0120.01021.99
8.3.40.0040.01118.80
8.3.30.0120.00318.68
8.3.20.0140.00020.34
8.3.10.0110.00723.47
8.3.00.0040.00419.25
8.2.180.0170.00318.38
8.2.170.0170.00322.96
8.2.160.0160.00320.39
8.2.150.0070.01124.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00417.75
8.2.110.0030.00619.31
8.2.100.0060.00617.84
8.2.90.0080.00019.36
8.2.80.0000.01017.97
8.2.70.0040.00417.75
8.2.60.0030.00618.05
8.2.50.0000.00818.07
8.2.40.0040.00419.50
8.2.30.0000.00720.52
8.2.20.0000.00817.81
8.2.10.0000.00818.28
8.2.00.0000.00818.14
8.1.280.0110.00425.92
8.1.270.0080.00023.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00921.43
8.1.230.0040.00817.45
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.00817.22
8.1.190.0040.00819.14
8.1.180.0000.00718.10
8.1.170.0000.01118.49
8.1.160.0000.00722.03
8.1.150.0040.00418.87
8.1.140.0000.00819.64
8.1.130.0000.00717.71
8.1.120.0030.00517.38
8.1.110.0030.00517.46
8.1.100.0040.00417.34
8.1.90.0040.00417.42
8.1.80.0000.00817.47
8.1.70.0050.00217.37
8.1.60.0040.00417.50
8.1.50.0000.00817.52
8.1.40.0000.00817.50
8.1.30.0000.00817.63
8.1.20.0030.00517.67
8.1.10.0060.00317.57
8.1.00.0040.00417.38
8.0.300.0070.00318.77
8.0.290.0000.00816.75
8.0.280.0000.00718.47
8.0.270.0070.00017.28
8.0.260.0030.00317.29
8.0.250.0000.00717.08
8.0.240.0060.00317.02
8.0.230.0090.00017.00
8.0.220.0000.00716.86
8.0.210.0000.00716.91
8.0.200.0040.00417.02
8.0.190.0060.00317.09
8.0.180.0000.00717.03
8.0.170.0050.00217.02
8.0.160.0030.00516.90
8.0.150.0040.00416.93
8.0.140.0030.00516.87
8.0.130.0000.00513.47
8.0.120.0030.00516.85
8.0.110.0070.00016.95
8.0.100.0040.00417.03
8.0.90.0030.00317.04
8.0.80.0060.00916.99
8.0.70.0000.00716.75
8.0.60.0040.00416.96
8.0.50.0050.00216.95
8.0.30.0080.01117.26
8.0.20.0180.00317.40
8.0.10.0030.00617.04
8.0.00.0110.00916.73
7.4.330.0000.00615.08
7.4.320.0030.00316.50
7.4.300.0000.00616.53
7.4.290.0030.00316.59
7.4.280.0040.00416.59
7.4.270.0020.00516.65
7.4.260.0040.00416.49
7.4.250.0000.00816.60
7.4.240.0000.00716.62
7.4.230.0070.00016.63
7.4.220.0100.01016.70
7.4.210.0080.00816.50
7.4.200.0070.00016.50
7.4.160.0100.01316.53
7.4.150.0090.00917.40
7.4.140.0140.01017.86
7.4.130.0080.00916.54
7.4.120.0080.01216.55
7.4.110.0100.01316.72
7.4.100.0160.00316.64
7.4.90.0150.00316.64
7.4.80.0120.00919.39
7.4.70.0080.00816.72
7.4.60.0160.00016.59
7.4.50.0000.00716.26
7.4.40.0120.00616.38
7.4.30.0040.01316.52
7.4.00.0030.01414.81
7.3.330.0050.00013.39
7.3.320.0030.00313.37
7.3.310.0030.00316.44
7.3.300.0070.00016.44
7.3.290.0100.00616.37
7.3.280.0090.00916.39
7.3.270.0070.01017.40
7.3.260.0100.00616.56
7.3.250.0070.00916.48
7.3.240.0080.01316.39
7.3.230.0170.00016.39
7.3.210.0100.00716.49
7.3.200.0150.00616.55
7.3.190.0110.00416.61
7.3.180.0100.00616.46
7.3.170.0080.01916.55
7.3.160.0040.01216.49
7.2.330.0140.00716.75
7.2.320.0040.01416.41
7.2.310.0060.00916.41
7.2.300.0070.01016.75
7.2.290.0030.01416.42
7.2.60.0070.00716.79
7.2.00.0000.01219.69
7.1.200.0040.00815.70
7.1.100.0080.00618.21
7.1.70.0000.01117.05
7.1.60.0070.01719.43
7.1.50.0090.01216.77
7.1.00.0000.07722.57
7.0.200.0060.00314.96
7.0.60.0000.05319.90
7.0.50.0100.08317.86
7.0.40.0100.08720.09
7.0.30.0370.09020.20
7.0.20.0370.08320.19
7.0.10.0130.05320.13
7.0.00.0030.08720.04
5.6.280.0000.03320.91
5.6.210.0100.04720.71
5.6.200.0070.05318.25
5.6.190.0070.07020.77
5.6.180.0430.06320.57
5.6.170.0230.06320.48
5.6.160.0070.05720.50
5.6.150.0100.06018.12
5.6.140.0070.08018.24
5.6.130.0070.07718.18
5.6.120.0100.04320.99
5.6.110.0100.08321.11
5.6.100.0070.08321.01
5.6.90.0070.08320.97
5.6.80.0100.04020.38
5.5.350.0300.06720.33
5.5.340.0070.03717.98
5.5.330.0070.08320.57
5.5.320.0170.05020.27
5.5.310.0270.07720.25
5.5.300.0130.07717.98
5.5.290.0100.09717.97
5.5.280.0070.07320.78
5.5.270.0130.07720.79
5.5.260.0100.08320.73
5.5.250.0030.06320.61
5.5.240.0070.04020.35
5.4.450.0130.06019.58
5.4.440.0200.06719.36
5.4.430.0200.05019.67
5.4.420.0070.06019.68
5.4.410.0130.05019.38
5.4.400.0100.05719.25
5.4.390.0130.05319.22
5.4.380.0170.05319.29
5.4.370.0170.05718.99
5.4.360.0200.05319.14
5.4.350.0270.04318.88
5.4.340.0270.05319.14
5.4.320.0170.05319.25
5.4.310.0200.04718.98
5.4.300.0130.05719.14
5.4.290.0200.05019.21
5.4.280.0270.04319.20
5.4.270.0130.05719.18
5.4.260.0130.05718.98
5.4.250.0170.04719.04
5.4.240.0100.05718.98
5.4.230.0200.07019.16
5.4.220.0100.06018.97
5.4.210.0270.05319.27
5.4.200.0130.06319.18
5.4.190.0170.05019.34
5.4.180.0170.06019.34
5.4.170.0130.05319.27
5.4.160.0270.04319.25
5.4.150.0170.05718.96
5.4.140.0130.05716.77
5.4.130.0230.04016.58
5.4.120.0130.05016.53
5.4.110.0070.05316.48
5.4.100.0130.05316.56
5.4.90.0170.04716.46
5.4.80.0200.04316.64
5.4.70.0100.05316.66
5.4.60.0130.05016.52
5.4.50.0070.05316.24
5.4.40.0100.07016.58
5.4.30.0200.04316.39
5.4.20.0170.04316.42
5.4.10.0100.05716.24
5.4.00.0100.05015.84

preferences:
54.42 ms | 401 KiB | 5 Q