3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a) { if (!is_array($a) && !($a instanceof \Traversable)) { throw new \Exception("here"); } return implode(' ', $a); } $traversable = new ArrayObject(); $traversable['test'] = 'that'; echo test(['a', 'b', 'c']); echo test($traversable);

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.0100.00318.43
8.3.50.0060.01218.18
8.3.40.0090.00619.03
8.3.30.0030.01019.17
8.3.20.0080.00020.37
8.3.10.0070.00023.66
8.3.00.0070.00019.07
8.2.180.0120.00318.41
8.2.170.0110.00422.96
8.2.160.0100.00322.18
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.04
8.2.110.0060.00322.13
8.2.100.0080.00417.84
8.2.90.0040.00417.91
8.2.80.0050.00319.33
8.2.70.0030.00517.93
8.2.60.0000.00818.22
8.2.50.0000.00918.10
8.2.40.0050.00319.48
8.2.30.0040.00419.25
8.2.20.0040.00417.75
8.2.10.0040.00417.93
8.2.00.0040.00417.74
8.1.270.0000.00818.86
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00923.80
8.1.230.0060.00622.73
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0120.00017.35
8.1.190.0060.00317.35
8.1.180.0000.00819.06
8.1.170.0000.00918.64
8.1.160.0040.00418.93
8.1.150.0030.00518.90
8.1.140.0000.00817.45
8.1.130.0040.00417.89
8.1.120.0070.00017.48
8.1.110.0000.00817.46
8.1.100.0070.00017.48
8.1.90.0030.00317.51
8.1.80.0090.00017.35
8.1.70.0040.00417.41
8.1.60.0080.00017.52
8.1.50.0000.00817.50
8.1.40.0000.00717.50
8.1.30.0040.00417.64
8.1.20.0000.00717.49
8.1.10.0050.00517.57
8.1.00.0020.00517.50
8.0.300.0040.00421.94
8.0.290.0040.00416.75
8.0.280.0030.00318.50
8.0.270.0030.00617.28
8.0.260.0000.00717.27
8.0.250.0000.00717.05
8.0.240.0000.00616.96
8.0.230.0070.00017.05
8.0.220.0030.00316.95
8.0.210.0070.00016.84
8.0.200.0030.00316.98
8.0.190.0000.00817.05
8.0.180.0000.00716.88
8.0.170.0000.00716.89
8.0.160.0000.00716.86
8.0.150.0070.00016.86
8.0.140.0060.00316.99
8.0.130.0030.00313.38
8.0.120.0050.00316.84
8.0.110.0000.00716.85
8.0.100.0070.00017.00
8.0.90.0000.00716.96
8.0.80.0060.01016.94
8.0.70.0000.00716.85
8.0.60.0080.00016.90
8.0.50.0040.00416.99
8.0.30.0100.01417.17
8.0.20.0110.00817.40
8.0.10.0040.00417.16
8.0.00.0100.01216.72
7.4.330.0020.00215.03
7.4.320.0000.00616.49
7.4.300.0000.00716.66
7.4.290.0030.00416.59
7.4.280.0040.00416.61
7.4.270.0030.00316.63
7.4.260.0050.00516.50
7.4.250.0030.00516.41
7.4.240.0020.00516.56
7.4.230.0030.00516.50
7.4.220.0100.01016.66
7.4.210.0060.00916.61
7.4.200.0030.00516.66
7.4.160.0090.00616.68
7.4.150.0180.00017.40
7.4.140.0100.00717.86
7.4.130.0090.00916.43
7.4.120.0120.00516.65
7.4.110.0060.01216.57
7.4.100.0070.01016.55
7.4.90.0100.01016.36
7.4.80.0120.00919.39
7.4.70.0070.01416.46
7.4.60.0040.01216.51
7.4.50.0000.00816.21
7.4.40.0130.00316.52
7.4.30.0060.01616.63
7.4.00.0070.01115.02
7.3.330.0000.00513.37
7.3.320.0030.00313.35
7.3.310.0040.00416.35
7.3.300.0000.00716.36
7.3.290.0060.01016.38
7.3.280.0100.01016.37
7.3.270.0070.01717.40
7.3.260.0060.01216.41
7.3.250.0120.00816.62
7.3.240.0110.00516.73
7.3.230.0080.00816.61
7.3.210.0060.01016.59
7.3.200.0090.00819.39
7.3.190.0030.01316.45
7.3.180.0060.00916.49
7.3.170.0090.01016.48
7.3.160.0100.00616.28
7.3.120.0110.00514.80
7.3.110.0090.00814.77
7.3.100.0100.00514.92
7.3.90.0060.00514.77
7.3.80.0110.00314.88
7.3.70.0030.00914.69
7.3.60.0040.00914.78
7.3.50.0030.01214.88
7.3.40.0060.00814.75
7.3.30.0080.00514.81
7.3.20.0030.01116.75
7.3.10.0070.00916.50
7.3.00.0080.00716.52
7.2.330.0140.00516.42
7.2.320.0060.01216.65
7.2.310.0100.00616.73
7.2.300.0070.01116.72
7.2.290.0060.00916.68
7.2.250.0100.00615.09
7.2.240.0090.00714.95
7.2.230.0050.00914.95
7.2.220.0030.00915.14
7.2.210.0080.00514.95
7.2.200.0100.00614.94
7.2.190.0060.00414.96
7.2.180.0000.01614.79
7.2.170.0080.00914.88
7.2.130.0140.00716.64
7.2.120.0140.00715.97
7.2.110.0080.01116.49
7.2.100.0060.00616.14
7.2.90.0070.00716.68
7.2.80.0060.01216.71
7.2.70.0080.01116.64
7.2.60.0070.01016.50
7.2.50.0230.00716.36
7.2.40.0040.01116.57
7.2.30.0110.00616.52
7.2.20.0030.01416.53
7.2.10.0090.00616.84
7.2.00.0070.01018.19
7.1.330.0030.01315.86
7.1.320.0110.00515.82
7.1.310.0050.01115.68
7.1.300.0060.00915.65
7.1.290.0060.00615.59
7.1.280.0080.00515.80
7.1.270.0080.00515.69
7.1.260.0080.00515.85
7.1.250.0110.00415.32
7.1.100.0030.01318.17
7.1.70.0030.00617.26
7.1.60.0140.01019.22
7.1.50.0060.01316.63
7.1.00.0030.07322.33
7.0.200.0060.00316.85
7.0.140.0030.05021.99
7.0.60.0100.07319.85
7.0.50.0000.07317.84
7.0.40.0100.05720.02
7.0.30.0530.07020.17
7.0.20.0270.07720.15
7.0.10.0100.08020.09
7.0.00.0070.08320.33
5.6.280.0030.07321.02
5.6.210.0030.04020.75
5.6.200.0070.04318.29
5.6.190.0000.05020.48
5.6.180.0130.06020.48
5.6.170.0230.08020.44
5.6.160.0070.03720.57
5.6.150.0070.08718.27
5.6.140.0000.04318.15
5.6.130.0100.06718.27
5.6.120.0070.08321.02
5.6.110.0130.07721.05
5.6.100.0100.07721.11
5.6.90.0000.06321.13
5.6.80.0000.05720.52
5.6.70.0170.04320.26
5.5.350.0000.08020.38
5.5.340.0070.07717.93
5.5.330.0030.06720.42
5.5.320.0370.07020.36
5.5.310.0100.04320.27
5.5.300.0070.05018.01
5.5.290.0070.07317.94
5.5.280.0070.05720.65
5.5.270.0070.03720.76
5.5.260.0100.05020.68
5.5.250.0130.07020.69
5.5.240.0030.06720.35
5.4.450.0600.05719.55
5.4.440.0130.06019.32
5.4.430.0270.06019.56
5.4.420.0430.03319.21
5.4.410.0170.05719.39
5.4.400.0170.05019.21
5.4.390.0270.04718.91
5.4.380.0330.05318.71
5.4.370.0300.05018.52
5.4.360.0300.05018.61
5.4.350.0330.05018.65
5.4.340.0270.05018.52
5.4.320.0330.04318.73
5.4.310.0300.05018.61
5.4.300.0270.05018.61
5.4.290.0200.05718.70
5.4.280.0130.06318.67
5.4.270.0300.04718.69
5.4.260.0330.05018.72
5.4.250.0230.05718.60
5.4.240.0270.05318.69
5.4.230.0300.05018.63
5.4.220.0430.05718.78
5.4.210.0300.05018.55
5.4.200.0270.05016.64
5.4.190.0230.05718.74
5.4.180.0330.05018.60
5.4.170.0300.05318.71
5.4.160.0230.05718.45
5.4.150.0370.06718.71
5.4.140.0300.04716.30
5.4.130.0270.05316.25
5.4.120.0330.05016.29
5.4.110.0270.05716.49
5.4.100.0270.05316.23
5.4.90.0270.07016.21
5.4.80.0170.05716.18
5.4.70.0230.06016.31
5.4.60.0270.04716.32
5.4.50.0300.04316.30
5.4.40.0300.04716.20
5.4.30.0230.05316.39
5.4.20.0100.06716.38
5.4.10.0200.05316.18
5.4.00.0300.05015.87
5.3.290.0400.04314.66
5.3.280.0470.04314.88
5.3.270.0200.06014.75
5.3.260.0270.05314.77
5.3.250.0300.06714.77
5.3.240.0300.05014.65
5.3.230.0300.05014.80
5.3.220.0370.04314.70
5.3.210.0330.07314.57
5.3.200.0300.05014.85
5.3.190.0230.06014.68
5.3.180.0270.07314.84
5.3.170.0300.05714.58
5.3.160.0270.05714.64
5.3.150.0270.05714.73
5.3.140.0230.05314.66
5.3.130.0230.06014.75
5.3.120.0200.06314.67
5.3.110.0230.06314.55
5.3.100.0400.06014.16
5.3.90.0430.06014.19
5.3.80.0370.04714.14
5.3.70.0300.04714.15
5.3.60.0230.05314.19
5.3.50.0300.04714.23
5.3.40.0270.04713.94
5.3.30.0170.05314.19
5.3.20.0370.04013.82
5.3.10.0230.05013.71
5.3.00.0300.04713.62
5.2.170.0270.03711.27
5.2.160.0200.04011.27
5.2.150.0170.04311.19
5.2.140.0130.04711.26
5.2.130.0230.03711.23
5.2.120.0230.03711.09
5.2.110.0230.04011.14
5.2.100.0200.05711.09
5.2.90.0230.04311.23
5.2.80.0230.04711.30
5.2.70.0230.04011.15
5.2.60.0200.04011.17
5.2.50.0230.04011.07
5.2.40.0130.04311.10
5.2.30.0270.03011.07
5.2.20.0230.04011.00
5.2.10.0130.04310.86
5.2.00.0270.03010.74
5.1.60.0270.0409.98
5.1.50.0170.03710.19
5.1.40.0200.03310.08
5.1.30.0230.04710.38
5.1.20.0200.03310.49
5.1.10.0200.03010.05
5.1.00.0200.03310.05
5.0.50.0070.0338.75
5.0.40.0070.0338.45
5.0.30.0070.0478.32
5.0.20.0100.0278.33
5.0.10.0070.0308.36
5.0.00.0030.0478.20
4.4.90.0100.0206.82
4.4.80.0030.0276.82
4.4.70.0030.0276.82
4.4.60.0070.0236.82
4.4.50.0130.0176.82
4.4.40.0100.0336.82
4.4.30.0070.0236.82
4.4.20.0100.0276.82
4.4.10.0030.0276.82
4.4.00.0100.0436.82
4.3.110.0130.0236.82
4.3.100.0070.0236.82
4.3.90.0170.0136.82
4.3.80.0070.0376.82
4.3.70.0100.0206.82
4.3.60.0070.0236.82
4.3.50.0100.0236.82
4.3.40.0100.0336.82
4.3.30.0030.0236.82
4.3.20.0030.0236.82
4.3.10.0030.0236.82
4.3.00.0000.0337.30

preferences:
72.38 ms | 400 KiB | 5 Q