3v4l.org

run code in 300+ PHP versions simultaneously
<?php function flat_map(callable $callback, array $collection) { return array_merge([], ...array_map($callback, $collection)); }; var_dump( array_map(function ($el) { return str_split($el); }, ["two birds", "three green peas"]) ); var_dump( flat_map(function ($el) { return str_split($el); }, ["two birds", "three green peas"]) ); var_dump( flat_map(function ($el) { return str_split($el); }, []) );

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.5.00.0150.00720.07
8.4.150.0020.00014.05
8.4.140.0140.00717.32
8.4.130.0120.00818.40
8.4.120.0050.00524.25
8.4.110.0030.00819.04
8.4.100.0100.00819.09
8.4.90.0140.00722.41
8.4.80.0130.00818.64
8.4.70.0120.00517.98
8.4.60.0090.01020.64
8.4.50.0260.00818.15
8.4.40.0190.01018.25
8.4.30.0210.00917.35
8.4.20.0160.00618.58
8.4.10.0130.00717.44
8.3.280.0090.01218.49
8.3.270.0120.00716.61
8.3.260.0100.01016.58
8.3.250.0040.00518.98
8.3.240.0090.01017.26
8.3.230.0090.01016.36
8.3.220.0110.00518.56
8.3.210.0080.01116.50
8.3.200.0230.00416.46
8.3.190.0180.00617.86
8.3.180.0250.00616.78
8.3.170.0270.00618.51
8.3.160.0260.00816.84
8.3.150.0180.00616.96
8.3.140.0180.00416.59
8.3.130.0200.00517.56
8.3.120.0240.00718.70
8.3.110.0120.00718.67
8.3.100.0140.00620.29
8.3.90.0160.00621.72
8.3.80.0130.00417.50
8.3.70.0260.00817.41
8.3.60.0190.01217.30
8.3.50.0150.01117.20
8.3.40.0180.00717.98
8.3.30.0250.00618.00
8.3.20.0230.00619.39
8.3.10.0180.00419.45
8.3.00.0080.00218.57
8.2.290.0130.00520.50
8.2.280.0140.00417.72
8.2.270.0160.00816.51
8.2.260.0090.00416.57
8.2.250.0120.00717.62
8.2.240.0180.00517.65
8.2.230.0190.00419.54
8.2.220.0190.00627.02
8.2.210.0240.00621.54
8.2.200.0130.00916.37
8.2.190.0200.00917.37
8.2.180.0200.00916.67
8.2.170.0230.00820.33
8.2.160.0200.01119.87
8.2.150.0210.00520.83
8.2.140.0170.00821.10
8.2.130.0140.00618.87
8.2.120.0110.00322.00
8.2.110.0130.00219.76
8.2.100.0130.00217.68
8.2.90.0070.00618.36
8.2.80.0100.00317.68
8.2.70.0160.00717.59
8.2.60.0170.00717.68
8.2.50.0180.00817.75
8.2.40.0140.01018.92
8.2.30.0190.00518.36
8.2.20.0180.00717.82
8.2.10.0190.00817.73
8.2.00.0170.00717.70
8.1.330.0100.01021.79
8.1.320.0230.00817.00
8.1.310.0130.00716.32
8.1.300.0200.00817.05
8.1.290.0140.00223.49
8.1.280.0140.00420.91
8.1.270.0140.00520.61
8.1.260.0160.00721.85
8.1.250.0170.00522.59
8.1.240.0150.00919.69
8.1.230.0190.00718.30
8.1.220.0160.00517.59
8.1.210.0160.00818.10
8.1.200.0190.00617.25
8.1.190.0170.00717.23
8.1.180.0190.00517.71
8.1.170.0180.00717.79
8.1.160.0150.00518.07
8.1.150.0110.00418.75
8.1.140.0100.00717.46
8.1.130.0150.00818.15
8.1.120.0170.00617.42
8.1.110.0190.00417.29
8.1.100.0170.00517.23
8.1.90.0150.00917.22
8.1.80.0160.00717.17
8.1.70.0180.00417.19
8.1.60.0170.00817.32
8.1.50.0150.00817.29
8.1.40.0210.00317.45
8.1.30.0190.00317.38
8.1.20.0180.00717.51
8.1.10.0200.00617.35
8.1.00.0210.00417.27
8.0.300.0170.00717.96
8.0.290.0200.00416.33
8.0.280.0110.00717.42
8.0.270.0150.00416.76
8.0.260.0110.00416.68
8.0.250.0150.00916.62
8.0.240.0160.00816.74
8.0.230.0140.00716.75
8.0.220.0170.00516.55
8.0.210.0110.00716.51
8.0.200.0150.00716.77
8.0.190.0120.00916.78
8.0.180.0210.00316.77
8.0.170.0180.00516.80
8.0.160.0120.01116.76
8.0.150.0190.00416.76
8.0.140.0150.00616.77
8.0.130.0130.00214.97
8.0.120.0060.00616.77
8.0.110.0180.00516.58
8.0.100.0160.00516.70
8.0.90.0190.00916.73
8.0.80.0160.00716.73
8.0.70.0140.00716.77
8.0.60.0180.00416.70
8.0.50.0140.00716.75
8.0.30.0180.00916.81
8.0.20.0150.00917.26
8.0.10.0210.00716.83
8.0.00.0220.00716.80
7.4.330.0130.00616.00
7.4.320.0130.00616.41
7.4.300.0160.00616.45
7.4.290.0150.00616.27
7.4.280.0170.00616.30
7.4.270.0170.00416.29
7.4.260.0120.01016.34
7.4.250.0140.00616.40
7.4.240.0140.00816.42
7.4.230.0210.00316.35
7.4.220.0170.00416.36
7.4.210.0140.00616.42
7.4.200.0170.00616.35
7.4.190.0270.00816.23
7.4.180.0290.01116.20
7.4.160.0190.00416.42
7.4.150.0140.01116.88
7.4.140.0180.00517.48
7.4.130.0270.00816.25
7.4.120.0150.01016.32
7.4.110.0240.00516.35
7.4.100.0160.01116.48
7.4.90.0190.01116.37
7.4.80.0240.00917.35
7.4.70.0160.01416.20
7.4.60.0210.00616.39
7.4.50.0160.01016.25
7.4.40.0170.00816.24
7.4.30.0230.01316.10
7.4.20.0240.01116.23
7.4.10.0240.00715.99
7.4.00.0120.01215.76
7.3.330.0200.00414.38
7.3.320.0150.00814.61
7.3.310.0200.00115.95
7.3.300.0160.00616.10
7.3.290.0170.00416.10
7.3.280.0150.00816.10
7.3.270.0210.00516.62
7.3.260.0190.00716.19
7.3.250.0300.00616.16
7.3.240.0170.00916.31
7.3.230.0200.00916.20
7.3.220.0330.00816.19
7.3.210.0250.00716.33
7.3.200.0190.01516.22
7.3.190.0180.01016.18
7.3.180.0210.00616.24
7.3.170.0170.01016.15
7.3.160.0200.00716.22
7.3.150.0240.00916.09
7.3.140.0250.00816.08
7.3.130.0270.00615.98
7.3.120.0200.00616.11
7.3.110.0210.01016.05
7.3.100.0230.01216.11
7.3.90.0210.01316.22
7.3.80.0290.00416.20
7.3.70.0220.01116.12
7.3.60.0250.00816.25
7.3.50.0270.00616.10
7.3.40.0240.01016.15
7.3.30.0230.01016.00
7.3.20.0310.00717.09
7.3.10.0230.01316.98
7.3.00.0270.01317.08
7.2.340.0290.01116.13
7.2.330.0260.00716.19
7.2.320.0240.00716.31
7.2.310.0220.00816.41
7.2.300.0210.00816.29
7.2.290.0190.01216.27
7.2.280.0280.00616.18
7.2.270.0250.00816.18
7.2.260.0230.01016.28
7.2.250.0240.01116.20
7.2.240.0230.01216.22
7.2.230.0300.00616.22
7.2.220.0280.00616.28
7.2.210.0260.01016.18
7.2.200.0250.01116.39
7.2.190.0250.00916.42
7.2.180.0270.00516.32
7.2.170.0230.01116.21
7.2.160.0240.00816.39
7.2.150.0350.00617.10
7.2.140.0250.00917.25
7.2.130.0220.01317.31
7.2.120.0260.00917.21
7.2.110.0310.00617.33
7.2.100.0240.00917.34
7.2.90.0220.00917.21
7.2.80.0200.00717.39
7.2.70.0180.00617.31
7.2.60.0150.00617.05
7.2.50.0330.00617.06
7.2.40.0290.00617.31
7.2.30.0280.01317.35
7.2.20.0240.00718.04
7.2.10.0240.00918.04
7.2.00.0250.00818.05
7.1.330.0270.00816.35
7.1.320.0260.00616.39
7.1.310.0200.01016.13
7.1.300.0270.00716.35
7.1.290.0220.00916.37
7.1.280.0220.00916.27
7.1.270.0230.00716.23
7.1.260.0200.00816.37
7.1.250.0210.01116.26
7.1.240.0340.01216.29
7.1.230.0230.00916.36
7.1.220.0220.01016.23
7.1.210.0280.00416.27
7.1.200.0190.00616.03
7.1.190.0230.00816.29
7.1.180.0250.01016.30
7.1.170.0240.00916.22
7.1.160.0270.00416.38
7.1.150.0250.01016.31
7.1.140.0210.00916.94
7.1.130.0190.01117.09
7.1.120.0210.00816.90
7.1.110.0180.01316.81
7.1.100.0180.01216.79
7.1.90.0170.01016.78
7.1.80.0170.01016.98
7.1.70.0210.01016.54
7.1.60.0360.00922.50
7.1.50.0210.01122.50
7.1.40.0210.01122.32
7.1.30.0210.01322.41
7.1.20.0210.01221.86
7.1.10.0200.00616.33
7.1.00.0190.01015.80
7.0.330.0220.00816.06
7.0.320.0290.00716.09
7.0.310.0200.00816.17
7.0.300.0250.00416.17
7.0.290.0210.00616.18
7.0.280.0230.00716.09
7.0.270.0250.00516.19
7.0.260.0240.00916.19
7.0.250.0250.00916.18
7.0.240.0200.01216.25
7.0.230.0260.00816.06
7.0.220.0220.01016.10
7.0.210.0280.00616.05
7.0.200.0320.00316.17
7.0.190.0200.01216.05
7.0.180.0310.00916.22
7.0.170.0270.00616.20
7.0.160.0190.00316.15
7.0.150.0170.00616.14
7.0.140.0170.00916.12
7.0.130.0150.01016.16
7.0.120.0200.00416.25
7.0.110.0220.01016.11
7.0.100.0280.00516.03
7.0.90.0250.00716.03
7.0.80.0210.00816.14
7.0.70.0400.01016.10
7.0.60.0230.00916.21
7.0.50.0260.00616.02
7.0.40.0260.00616.10
7.0.30.0240.00616.13
7.0.20.0250.00416.21
7.0.10.0190.01116.05
7.0.00.0170.01116.28
5.6.400.0180.01015.69
5.6.390.0240.00715.76
5.6.380.0240.00615.55
5.6.370.0240.00815.82
5.6.360.0270.00515.75
5.6.350.0230.00815.69
5.6.340.0220.00915.47
5.6.330.0160.01315.63
5.6.320.0230.00915.53
5.6.310.0240.01215.90
5.6.300.0270.00415.74
5.6.290.0250.00815.54
5.6.280.0230.01115.74
5.6.270.0210.01215.65
5.6.260.0190.01115.85
5.6.250.0230.00815.65
5.6.240.0270.00415.73
5.6.230.0200.01115.65
5.6.220.0250.00915.74
5.6.210.0190.01215.67
5.6.200.0220.00815.92
5.6.190.0180.01215.90
5.6.180.0200.01115.76
5.6.170.0260.00815.70
5.6.160.0210.01215.79
5.6.150.0210.00615.81
5.6.140.0250.00715.49
5.6.130.0190.01215.69
5.6.120.0240.00815.67
5.6.110.0220.00515.66
5.6.100.0190.00915.60
5.6.90.0200.01015.82
5.6.80.0270.00615.75
5.6.70.0200.01015.67
5.6.60.0260.00515.64
5.6.50.0170.00515.71
5.6.40.0170.00415.70
5.6.30.0200.00415.59
5.6.20.0180.00915.53
5.6.10.0190.01115.65
5.6.00.0200.01115.57

preferences:
131.94 ms | 403 KiB | 5 Q