3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Function Argument Unpacking in PHP 5.6 complements Variadic Functions! */ class Foo { public function __construct($arg1, $arg2, $arg3) { /* Do stuff constructor with arguments */ $this->arg1 = $arg1; $this->arg2 = $arg2; $this->arg3 = $arg3; } } class Bar extends Foo { public function __construct(...$args) { /** * Before argument unpacking in 5.6 we would use * call_user_func_array + func_get_args to accomplish * the same thing. */ // The intent here is to call the parent constructor parent::__construct(...$args); // Looks much nicer in 5.6 } } $bar = new Bar(1,2,3); var_dump($bar);

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.0070.01418.83
8.3.30.0100.00718.80
8.3.20.0050.00320.19
8.3.10.0080.00022.03
8.3.00.0070.00022.46
8.2.170.0070.00722.96
8.2.160.0100.00720.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0140.00426.16
8.2.120.0030.00519.62
8.2.110.0030.00621.03
8.2.100.0080.00417.91
8.2.90.0040.00418.16
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0080.00017.80
8.2.50.0050.00318.07
8.2.40.0000.00818.16
8.2.30.0040.00418.09
8.2.20.0040.00417.63
8.2.10.0040.00417.58
8.2.00.0060.00617.61
8.1.270.0060.00318.55
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0120.00323.83
8.1.230.0080.00320.89
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0060.00717.23
8.1.190.0050.00317.23
8.1.180.0050.00320.53
8.1.170.0000.00818.63
8.1.160.0000.00722.17
8.1.150.0000.00818.63
8.1.140.0040.00417.46
8.1.130.0000.00717.85
8.1.120.0040.00417.43
8.1.110.0000.00717.29
8.1.100.0000.00717.32
8.1.90.0030.00517.39
8.1.80.0000.00817.42
8.1.70.0000.00717.29
8.1.60.0000.00817.60
8.1.50.0040.00417.50
8.1.40.0040.00417.57
8.1.30.0030.00517.48
8.1.20.0000.00817.73
8.1.10.0040.00417.46
8.1.00.0040.00717.45
8.0.300.0060.00320.18
8.0.290.0040.00416.75
8.0.280.0030.00318.28
8.0.270.0000.00817.23
8.0.260.0030.00316.73
8.0.250.0000.00716.81
8.0.240.0000.00816.88
8.0.230.0000.00716.81
8.0.220.0000.00816.83
8.0.210.0060.00016.88
8.0.200.0000.00616.86
8.0.190.0000.00716.96
8.0.180.0040.00416.83
8.0.170.0000.00716.79
8.0.160.0060.00316.85
8.0.150.0040.00416.77
8.0.140.0000.00716.81
8.0.130.0030.00313.24
8.0.120.0040.00416.77
8.0.110.0000.00716.76
8.0.100.0000.00816.82
8.0.90.0040.00416.73
8.0.80.0060.00916.89
8.0.70.0040.00416.75
8.0.60.0000.00816.64
8.0.50.0000.00716.88
8.0.30.0070.01117.02
8.0.20.0090.01317.40
8.0.10.0000.00817.04
8.0.00.0100.01116.72
7.4.330.0040.00015.00
7.4.320.0000.00716.60
7.4.300.0000.00616.48
7.4.290.0000.00716.54
7.4.280.0060.00616.53
7.4.270.0030.00316.63
7.4.260.0000.00716.58
7.4.250.0040.00416.60
7.4.240.0020.00516.48
7.4.230.0040.00316.63
7.4.220.0060.01516.66
7.4.210.0100.00416.61
7.4.200.0050.00216.52
7.4.190.0070.00016.79
7.4.160.0090.00616.43
7.4.150.0070.01117.40
7.4.140.0110.01117.86
7.4.130.0100.00916.49
7.4.120.0090.00916.50
7.4.110.0060.01616.45
7.4.100.0060.01316.57
7.4.90.0100.00716.51
7.4.80.0070.01319.39
7.4.70.0100.00616.36
7.4.60.0140.00616.44
7.4.50.0060.00316.49
7.4.40.0100.00622.77
7.4.30.0050.01016.43
7.4.00.0070.01114.87
7.3.330.0030.00313.26
7.3.320.0000.00613.25
7.3.310.0030.00316.27
7.3.300.0060.00016.20
7.3.290.0100.00516.29
7.3.280.0090.00916.25
7.3.270.0070.01017.40
7.3.260.0060.01216.25
7.3.250.0090.00916.34
7.3.240.0070.01116.25
7.3.230.0140.00716.39
7.3.210.0070.01016.22
7.3.200.0090.00619.39
7.3.190.0030.01316.31
7.3.180.0100.00716.49
7.3.170.0030.01416.27
7.3.160.0070.01016.17
7.3.120.0020.01614.79
7.3.110.0000.01814.95
7.3.100.0110.00414.27
7.3.90.0030.00714.68
7.3.80.0030.00914.80
7.3.70.0040.00714.79
7.3.60.0110.00314.58
7.3.50.0090.00014.68
7.3.40.0090.00014.92
7.3.30.0090.00414.50
7.3.20.0030.01216.65
7.3.10.0090.00616.48
7.3.00.0030.01016.68
7.2.330.0090.00816.48
7.2.320.0060.01416.54
7.2.310.0090.00916.66
7.2.300.0120.00616.36
7.2.290.0100.00616.63
7.2.250.0090.00914.93
7.2.240.0100.01014.94
7.2.230.0040.01114.93
7.2.220.0070.00715.07
7.2.210.0040.01114.82
7.2.200.0070.01114.80
7.2.190.0040.01214.88
7.2.180.0040.00814.77
7.2.170.0120.00014.67
7.2.60.0120.00016.64
7.2.50.0040.01116.74
7.1.330.0060.00615.71
7.1.320.0000.01315.56
7.1.310.0090.00615.96
7.1.300.0070.00715.58
7.1.290.0070.00715.78
7.1.280.0000.01315.48
7.1.270.0030.00715.75
7.1.260.0070.01015.86
7.1.200.0060.00615.80
7.1.70.0000.01017.25
7.1.60.0120.01219.82
7.1.50.0070.01416.95
7.1.00.0000.04722.57
7.0.200.0040.00714.89
7.0.140.0070.07022.00
7.0.60.0000.07019.95
7.0.50.0170.06717.86
7.0.40.0100.05020.20
7.0.30.0400.07320.10
7.0.20.0330.07720.14
7.0.10.0070.07720.34
7.0.00.0130.07720.06
5.6.280.0130.06721.13
5.6.210.0000.04320.71
5.6.200.0070.05318.16
5.6.190.0070.08020.34
5.6.180.0170.04720.38
5.6.170.0270.04020.50
5.6.160.0030.04320.44
5.6.150.0100.07718.29
5.6.140.0070.03318.14
5.6.130.0070.06018.12
5.6.120.0070.08021.04
5.6.110.0030.08321.10
5.6.100.0170.06020.99
5.6.90.0070.06320.96
5.6.80.0070.07320.53
5.5.350.0330.04720.43
5.5.340.0000.04018.05
5.5.330.0100.05020.19
5.5.320.0330.03320.36
5.5.310.0430.05020.36
5.5.300.0030.03718.08
5.5.290.0130.07318.01
5.5.280.0130.07720.86
5.5.270.0170.04720.73
5.5.260.0170.07720.80
5.5.250.0100.06320.70
5.5.240.0000.08020.33
5.4.450.0770.05319.31
5.4.440.0870.06019.30
5.4.430.0830.05019.16
5.4.420.1100.05019.63
5.4.410.0070.05718.73
5.4.400.0230.05718.82
5.4.390.0430.07018.78
5.4.380.0130.06018.63
5.4.370.0130.04718.53
5.4.360.0070.03718.50
5.4.350.0060.03812.04
5.4.340.0100.03812.04
5.4.320.0040.03912.52
5.4.310.0080.03812.52
5.4.300.0070.03612.52
5.4.290.0110.03212.52
5.4.280.0040.03612.41
5.4.270.0030.04312.41
5.4.260.0050.04412.41
5.4.250.0070.06018.76
5.4.240.0130.04718.82
5.4.230.0170.04718.74
5.4.220.0100.06018.82
5.4.210.0100.05718.80
5.4.200.0100.06318.94
5.4.190.0130.06318.79
5.4.180.0030.06018.75
5.4.170.0100.05019.02
5.4.160.0030.05718.73
5.4.150.0200.04019.07
5.4.140.0130.04716.55
5.4.130.0070.04716.49
5.4.120.0200.05716.45
5.4.110.0130.05016.50
5.4.100.0100.05016.60
5.4.90.0100.05016.49
5.4.80.0100.06716.52
5.4.70.0130.05316.55
5.4.60.0170.04316.30
5.4.50.0070.05716.48
5.4.40.0070.05016.43
5.4.30.0100.06016.32
5.4.20.0170.04716.52
5.4.10.0170.04716.45
5.4.00.0070.05715.76
5.3.290.0060.04012.80
5.3.280.0130.06714.78
5.3.270.0100.06014.61
5.3.260.0130.04714.70
5.3.250.0070.05014.77
5.3.240.0030.05314.57
5.3.230.0030.06014.60
5.3.220.0130.04314.63
5.3.210.0000.08714.79
5.3.200.0070.06314.54
5.3.190.0130.04314.56
5.3.180.0100.04714.65
5.3.170.0130.06714.60
5.3.160.0070.05014.55
5.3.150.0100.07314.55
5.3.140.0130.05314.64
5.3.130.0100.05014.55
5.3.120.0170.05714.73
5.3.110.0100.06314.52
5.3.100.0100.06314.20
5.3.90.0170.05014.09
5.3.80.0100.05314.04
5.3.70.0130.04714.11
5.3.60.0030.05314.02
5.3.50.0170.04013.94
5.3.40.0030.07314.04
5.3.30.0130.06013.82
5.3.20.0130.05713.73
5.3.10.0070.04713.87
5.3.00.0200.06013.47
5.2.170.0030.04711.33
5.2.160.0030.06011.23
5.2.150.0070.04011.23
5.2.140.0070.04011.22
5.2.130.0030.06311.00
5.2.120.0070.05711.18
5.2.110.0000.05711.32
5.2.100.0070.05711.20
5.2.90.0130.04711.11
5.2.80.0070.05311.10
5.2.70.0070.06010.93
5.2.60.0070.04711.13
5.2.50.0030.04311.01
5.2.40.0100.04711.22
5.2.30.0070.06011.05
5.2.20.0170.04311.13
5.2.10.0030.04010.77
5.2.00.0070.04010.68
5.1.60.0070.03010.02
5.1.50.0100.04010.24
5.1.40.0070.0379.96
5.1.30.0100.03010.38
5.1.20.0070.03710.32
5.1.10.0030.03710.27
5.1.00.0070.04710.03
5.0.50.0100.0338.59
5.0.40.0070.0308.40
5.0.30.0070.0408.14
5.0.20.0070.0338.29
5.0.10.0100.0378.11
5.0.00.0030.0438.17
4.4.90.0070.0276.41
4.4.80.0100.0236.41
4.4.70.0030.0236.41
4.4.60.0000.0336.41
4.4.50.0000.0306.41
4.4.40.0030.0476.41
4.4.30.0030.0206.41
4.4.20.0100.0276.41
4.4.10.0070.0176.41
4.4.00.0000.0476.41
4.3.110.0000.0336.38
4.3.100.0000.0236.36
4.3.90.0000.0336.36
4.3.80.0000.0476.36
4.3.70.0030.0206.36
4.3.60.0030.0236.36
4.3.50.0070.0236.36
4.3.40.0100.0376.36
4.3.30.0000.0336.36
4.3.20.0000.0336.36
4.3.10.0000.0236.36
4.3.00.0130.0207.13

preferences:
39.68 ms | 400 KiB | 5 Q