3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar{} $bars = [new Bar, new Bar, new Bar]; $ints = [1, 2, 3]; // php 5.6 style function foo(Bar ...$bars) { echo "Got " . count($bars) . " bars.\n"; } foo(...$bars); // fatal error foo(...$ints); // without variadics function oldFoo($bars) { foreach ($bars as $bar) { if (!$bar instanceof Bar) { throw new InvalidArgumentException("Must be a Bar."); } } echo "Got " . count($bars) . " bars.\n"; } oldFoo($bars); // InvalidArgumentException oldFoo($ints);

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.0110.00418.43
8.3.50.0140.00521.97
8.3.40.0100.01018.83
8.3.30.0180.00318.84
8.3.20.0040.00420.30
8.3.10.0040.00422.09
8.3.00.0040.00422.57
8.2.180.0090.00616.63
8.2.170.0000.01522.96
8.2.160.0070.01020.80
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00817.63
8.2.110.0080.00022.16
8.2.100.0080.00417.84
8.2.90.0080.00019.37
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0050.00317.80
8.2.50.0080.00018.07
8.2.40.0080.00018.16
8.2.30.0050.00518.07
8.2.20.0000.00717.64
8.2.10.0000.00819.47
8.2.00.0000.00817.82
8.1.280.0130.00725.92
8.1.270.0040.00423.74
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00423.91
8.1.230.0030.01019.20
8.1.220.0030.00617.79
8.1.210.0000.00818.77
8.1.200.0000.00917.47
8.1.190.0040.00417.55
8.1.180.0040.00418.10
8.1.170.0030.00618.59
8.1.160.0040.00421.93
8.1.150.0070.00018.52
8.1.140.0080.00417.46
8.1.130.0040.00417.84
8.1.120.0070.00017.39
8.1.110.0000.00717.43
8.1.100.0000.00717.43
8.1.90.0070.00017.46
8.1.80.0040.00417.37
8.1.70.0030.00517.46
8.1.60.0030.00617.64
8.1.50.0040.00417.54
8.1.40.0040.00417.54
8.1.30.0040.00817.67
8.1.20.0090.00017.55
8.1.10.0050.00217.45
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0000.00717.16
8.0.280.0030.00318.51
8.0.270.0000.00717.18
8.0.260.0000.00716.88
8.0.250.0000.00716.90
8.0.240.0040.00416.90
8.0.230.0000.00716.92
8.0.220.0020.00516.98
8.0.210.0060.00016.97
8.0.200.0030.00316.97
8.0.190.0040.00416.93
8.0.180.0000.00716.91
8.0.170.0000.00816.98
8.0.160.0050.00316.83
8.0.150.0000.00816.79
8.0.140.0050.00216.92
8.0.130.0030.00313.41
8.0.120.0040.00416.96
8.0.110.0040.00416.91
8.0.100.0060.00316.99
8.0.90.0070.00016.78
8.0.80.0070.00716.96
8.0.70.0070.00016.93
8.0.60.0070.00017.02
8.0.50.0040.00416.90
8.0.30.0060.01617.02
8.0.20.0110.00817.40
8.0.10.0040.00417.05
8.0.00.0130.00516.79
7.4.330.0020.00215.05
7.4.320.0030.00316.54
7.4.300.0000.00716.50
7.4.290.0070.00016.55
7.4.280.0000.00816.61
7.4.270.0000.00716.56
7.4.260.0000.00816.52
7.4.250.0050.00216.52
7.4.240.0050.00216.58
7.4.230.0030.00316.39
7.4.220.0200.00316.63
7.4.210.0040.01016.63
7.4.200.0000.00716.65
7.4.190.0020.00516.78
7.4.160.0110.00516.39
7.4.150.0070.01417.40
7.4.140.0100.00817.86
7.4.130.0100.00716.64
7.4.120.0100.00616.54
7.4.110.0070.01016.54
7.4.100.0130.00916.43
7.4.90.0090.00916.48
7.4.80.0090.01219.39
7.4.70.0130.00316.63
7.4.60.0080.00816.40
7.4.50.0040.00016.61
7.4.40.0080.00722.77
7.4.30.0030.01316.59
7.4.10.0100.00415.65
7.4.00.0060.00915.49
7.3.330.0030.00313.32
7.3.320.0000.00513.33
7.3.310.0000.00716.32
7.3.300.0000.00716.42
7.3.290.0030.01316.38
7.3.280.0080.00816.34
7.3.270.0120.00617.40
7.3.260.0080.00816.54
7.3.250.0110.00716.49
7.3.240.0150.00416.45
7.3.230.0140.00416.45
7.3.210.0080.00916.51
7.3.200.0090.00919.39
7.3.190.0140.00616.47
7.3.180.0040.01116.40
7.3.170.0060.01016.60
7.3.160.0110.00716.46
7.3.130.0040.01315.61
7.3.120.0060.01115.25
7.3.110.0050.01015.60
7.3.100.0060.00615.51
7.3.90.0040.01015.56
7.3.80.0030.01215.60
7.3.70.0090.00915.37
7.3.60.0030.01015.67
7.3.50.0050.00915.67
7.3.40.0080.00915.59
7.3.30.0140.00215.66
7.3.20.0060.00417.40
7.3.10.0040.00717.36
7.3.00.0080.00917.39
7.2.330.0140.00416.64
7.2.320.0100.00716.75
7.2.310.0080.00816.45
7.2.300.0110.01316.73
7.2.290.0070.01016.75
7.2.260.0120.00715.57
7.2.250.0070.01015.77
7.2.240.0050.01015.89
7.2.230.0060.00915.88
7.2.220.0060.00815.67
7.2.210.0070.00815.75
7.2.200.0030.01415.86
7.2.190.0020.00915.71
7.2.180.0020.01015.60
7.2.170.0050.00915.71
7.2.160.0070.00915.74
7.2.150.0010.01117.47
7.2.140.0050.00917.44
7.2.130.0130.00317.49
7.2.120.0050.00817.67
7.2.110.0070.00917.47
7.2.100.0050.01017.63
7.2.90.0020.01517.56
7.2.80.0100.00717.66
7.2.70.0090.00417.68
7.2.60.0100.00417.33
7.2.50.0040.01017.68
7.2.40.0090.00517.66
7.2.30.0050.00917.63
7.2.20.0070.00517.61
7.2.10.0060.00917.59
7.2.00.0030.00717.73
7.1.330.0020.01216.62
7.1.320.0030.01016.36
7.1.310.0080.00716.51
7.1.300.0060.00816.67
7.1.290.0060.00516.61
7.1.280.0040.00616.60
7.1.270.0020.01116.52
7.1.260.0060.00616.46
7.1.250.0120.00516.45
7.1.240.0030.01016.48
7.1.230.0060.00616.44
7.1.220.0080.00516.62
7.1.210.0060.00616.54
7.1.200.0070.00716.12
7.1.190.0050.01016.31
7.1.180.0020.01116.49
7.1.170.0020.01116.39
7.1.160.0050.00716.53
7.1.150.0020.00816.50
7.1.140.0070.00716.56
7.1.130.0090.00716.32
7.1.120.0040.01116.44
7.1.110.0070.00416.54
7.1.100.0080.00516.97
7.1.90.0050.01116.44
7.1.80.0030.01116.34
7.1.70.0010.01116.61
7.1.60.0060.01017.69
7.1.50.0060.01016.56
7.1.40.0060.00616.51
7.1.30.0070.00816.55
7.1.20.0070.00316.37
7.1.10.0020.00816.41
7.1.00.0060.03018.36
7.0.330.0040.01015.99
7.0.320.0040.00916.03
7.0.310.0050.00915.98
7.0.300.0070.00316.13
7.0.290.0080.00516.08
7.0.280.0060.00516.11
7.0.270.0050.01016.21
7.0.260.0020.01216.22
7.0.250.0100.00316.16
7.0.240.0080.00516.14
7.0.230.0050.00516.15
7.0.220.0040.00716.06
7.0.210.0040.00916.20
7.0.200.0080.00416.41
7.0.190.0050.00616.16
7.0.180.0080.00616.27
7.0.170.0050.01016.24
7.0.160.0030.01116.07
7.0.150.0050.00716.22
7.0.140.0050.03018.12
7.0.130.0020.01116.32
7.0.120.0040.00916.01
7.0.110.0100.00516.16
7.0.100.0080.00716.08
7.0.90.0030.01016.05
7.0.80.0070.00716.17
7.0.70.0050.01016.10
7.0.60.0080.02917.32
7.0.50.0090.03016.72
7.0.40.0090.02516.16
7.0.30.0070.02516.15
7.0.20.0120.01716.16
7.0.10.0110.01616.11
7.0.00.0090.02716.10
5.6.400.0060.00715.00
5.6.390.0050.00815.23
5.6.380.0050.01015.02
5.6.370.0110.00015.03
5.6.360.0050.01115.03
5.6.350.0010.00915.10
5.6.340.0070.00715.35
5.6.330.0070.00614.88
5.6.320.0030.00815.00
5.6.310.0060.00815.17
5.6.300.0050.00714.92
5.6.290.0080.00715.35
5.6.280.0010.03217.27
5.6.270.0050.00815.03
5.6.260.0060.00715.26
5.6.250.0040.00915.18
5.6.240.0050.01015.11
5.6.230.0050.01015.06
5.6.220.0060.00815.23
5.6.210.0110.01216.84
5.6.200.0080.03116.04
5.6.190.0040.02916.88
5.6.180.1380.02016.75
5.6.170.0120.01616.78
5.6.160.0060.03016.88
5.6.150.0060.02615.97
5.6.140.0040.02216.07
5.6.130.0030.02116.26
5.6.120.0060.01617.04
5.6.110.0030.03917.06
5.6.100.0070.03317.11
5.6.90.0040.03116.94
5.6.80.0130.02216.60
5.6.70.1510.01916.83
5.6.60.0060.00514.83
5.6.50.0070.01014.94
5.6.40.0050.00814.89
5.6.30.0090.00514.91
5.6.20.0100.00614.91
5.6.10.0050.00614.95
5.6.00.0080.00915.02
5.5.380.0050.01214.56
5.5.370.0070.00914.82
5.5.360.0030.01414.67
5.5.350.0100.02116.63
5.5.340.0070.02715.73
5.5.330.0050.02116.75
5.5.320.0170.03216.86
5.5.310.0130.02916.66
5.5.300.0080.03115.87
5.5.290.0070.01815.86
5.5.280.0070.01616.74
5.5.270.0110.02316.62
5.5.260.0060.03816.70
5.5.250.0030.02616.48
5.5.240.0030.02916.66
5.5.230.0070.00714.65
5.5.220.0050.01114.72
5.5.210.0040.01014.61
5.5.200.0070.00414.65
5.5.190.0040.01114.68
5.5.180.0070.01014.75
5.5.170.0060.00614.76
5.5.160.0090.00914.60
5.5.150.0030.00914.90
5.5.140.0060.00814.57
5.5.130.0040.00614.70
5.5.120.0060.00614.58
5.5.110.0020.01314.60
5.5.100.0010.01214.83
5.5.90.0050.01014.60
5.5.80.0070.00514.71
5.5.70.0100.00314.43
5.5.60.0050.01114.54
5.5.50.0050.00814.62
5.5.40.0030.01214.69
5.5.30.0060.00914.85
5.5.20.0050.00914.63
5.5.10.0040.00614.65
5.5.00.0050.00514.82
5.4.450.0120.01714.28
5.4.440.0160.01814.03
5.4.430.0140.01914.24
5.4.420.0210.01614.29
5.4.410.0050.02514.15
5.4.400.0050.02413.95
5.4.390.0060.02113.85
5.4.380.0130.01913.97
5.4.370.0130.01813.89
5.4.360.0130.01614.00
5.4.350.0100.02214.07
5.4.340.0090.02313.97
5.4.330.0030.00911.66
5.4.320.0050.01811.88
5.4.310.0050.01611.89
5.4.300.0030.01911.89
5.4.290.0050.01511.88
5.4.280.0030.01911.81
5.4.270.0040.01611.93
5.4.260.0040.01911.84
5.4.250.0020.02011.85
5.4.240.0030.01911.84
5.4.230.0060.01511.92
5.4.220.0040.01711.81
5.4.210.0020.01811.84
5.4.200.0050.01711.85
5.4.190.0040.01711.80
5.4.180.0030.01711.86
5.4.170.0070.01411.73
5.4.160.0040.01811.73
5.4.150.0050.01611.87
5.4.140.0060.01511.77
5.4.130.0060.01411.67
5.4.120.0050.01511.79
5.4.110.0050.01811.78
5.4.100.0040.01611.73
5.4.90.0050.02011.66
5.4.80.0030.01811.77
5.4.70.0050.01511.66
5.4.60.0060.01411.76
5.4.50.0050.01911.63
5.4.40.0070.01211.72
5.4.30.0040.01811.65
5.4.20.0050.01711.75
5.4.10.0050.01311.72
5.4.00.0040.01711.50
5.3.290.0070.01811.95
5.3.280.0060.01511.85
5.3.270.0050.01711.81
5.3.260.0050.01811.93
5.3.250.0060.01611.84
5.3.240.0020.01911.75
5.3.230.0040.02011.90
5.3.220.0040.01811.86
5.3.210.0060.01611.85
5.3.200.0080.01311.78
5.3.190.0030.02011.95
5.3.180.0050.01712.04
5.3.170.0050.01711.99
5.3.160.0070.01311.95
5.3.150.0050.01812.01
5.3.140.0070.01511.90
5.3.130.0040.01911.91
5.3.120.0040.01811.91
5.3.110.0020.01811.92
5.3.100.0050.01511.72
5.3.90.0030.01911.74
5.3.80.0020.01911.70
5.3.70.0050.01611.69
5.3.60.0030.01711.72
5.3.50.0060.01711.63
5.3.40.0060.01511.65
5.3.30.0030.01711.56
5.3.20.0030.01811.64
5.3.10.0030.01611.50
5.3.00.0040.01711.33
5.2.170.0050.0299.18
5.2.160.0060.0289.18
5.2.150.0060.0289.18
5.2.140.0040.0309.18
5.2.130.0040.0309.14
5.2.120.0030.0309.14
5.2.110.0050.0289.14
5.2.100.0040.0289.14
5.2.90.0050.0289.14
5.2.80.0020.0339.13
5.2.70.0040.0349.13
5.2.60.0060.0339.08
5.2.50.0050.0289.06
5.2.40.0020.0319.03
5.2.30.0030.0309.01
5.2.20.0040.0299.00
5.2.10.0030.0298.91
5.2.00.0020.0318.77
5.1.60.0020.0258.05
5.1.50.0040.0258.05
5.1.40.0030.0258.04
5.1.30.0040.0258.38
5.1.20.0040.0308.41
5.1.10.0070.0268.13
5.1.00.0050.0318.13
5.0.50.0020.0226.60
5.0.40.0030.0246.46
5.0.30.0020.0346.29
5.0.20.0020.0206.24
5.0.10.0040.0196.22
5.0.00.0040.0316.21
4.4.90.0010.0164.78
4.4.80.0000.0184.76
4.4.70.0020.0164.75
4.4.60.0050.0134.76
4.4.50.0030.0154.76
4.4.40.0020.0274.70
4.4.30.0030.0154.75
4.4.20.0030.0174.84
4.4.10.0080.0294.84
4.4.00.0020.0304.76
4.3.110.0020.0164.67
4.3.100.0060.0134.66
4.3.90.0060.0164.64
4.3.80.0050.0384.59
4.3.70.0020.0184.63
4.3.60.0040.0174.63
4.3.50.0050.0184.63
4.3.40.0050.0244.54
4.3.30.0060.0363.28
4.3.20.0040.0193.26
4.3.10.0030.0203.23
4.3.00.0030.01713.28

preferences:
48.35 ms | 401 KiB | 5 Q