3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nu_array = null; $callback = function ( $item ) use(&$callback, &$nu_array) { if (!is_array($item)) { $nu_array[] = $item; } else if ( is_array( $item ) ) { foreach( array_values($item) as $v) { if ( !(is_array($v))) { $nu_array[] = $v; } else { $callback( $v ); continue; } } } }; $array = array('alpha',array(1,2,3),'beta',array(7,8,array(9,10))); array_walk($array, $callback); var_dump($nu_array);

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.00718.55
8.3.50.0140.00522.06
8.3.40.0100.01018.97
8.3.30.0070.00719.26
8.3.20.0060.00320.07
8.3.10.0080.00020.36
8.3.00.0080.00019.26
8.2.180.0070.01118.16
8.2.170.0090.00622.96
8.2.160.0030.01020.41
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00422.27
8.2.110.0030.00620.50
8.2.100.0000.01118.03
8.2.90.0050.00319.30
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0050.00317.93
8.2.50.0060.00318.07
8.2.40.0070.00018.09
8.2.30.0070.00018.13
8.2.20.0030.00617.86
8.2.10.0000.00718.19
8.2.00.0000.00717.61
8.1.280.0140.00725.92
8.1.270.0080.00022.19
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0030.00623.75
8.1.230.0040.00719.16
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0090.00017.22
8.1.180.0040.00418.10
8.1.170.0040.00418.71
8.1.160.0050.00321.92
8.1.150.0070.00018.96
8.1.140.0000.00717.50
8.1.130.0040.00419.15
8.1.120.0000.00817.38
8.1.110.0040.00417.37
8.1.100.0040.00417.46
8.1.90.0100.00017.50
8.1.80.0000.00817.45
8.1.70.0030.00317.30
8.1.60.0030.00617.47
8.1.50.0040.00417.40
8.1.40.0040.00417.56
8.1.30.0030.00617.45
8.1.20.0040.00417.62
8.1.10.0020.00517.47
8.1.00.0030.00617.52
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.39
8.0.270.0080.00017.19
8.0.260.0030.00316.83
8.0.250.0050.00316.97
8.0.240.0030.00316.95
8.0.230.0100.00016.94
8.0.220.0000.00716.80
8.0.210.0030.00316.77
8.0.200.0030.00316.96
8.0.190.0070.00016.92
8.0.180.0040.00416.87
8.0.170.0040.00416.89
8.0.160.0040.00416.80
8.0.150.0070.00016.77
8.0.140.0000.00716.85
8.0.130.0040.00413.34
8.0.120.0000.00716.77
8.0.110.0040.00416.93
8.0.100.0040.00416.75
8.0.90.0000.00716.76
8.0.80.0090.00616.92
8.0.70.0080.00016.93
8.0.60.0040.00416.78
8.0.50.0040.00416.84
8.0.30.0140.00816.78
8.0.20.0070.01317.40
8.0.10.0050.00317.01
8.0.00.0100.01116.75
7.4.330.0000.00515.05
7.4.320.0030.00316.64
7.4.300.0060.00016.43
7.4.290.0040.00416.64
7.4.280.0000.00816.57
7.4.270.0070.00016.44
7.4.260.0030.00316.63
7.4.250.0040.00416.51
7.4.240.0000.00716.49
7.4.230.0070.00016.39
7.4.220.0070.01116.55
7.4.210.0140.00016.44
7.4.200.0070.00016.25
7.4.160.0110.00516.65
7.4.150.0000.02317.40
7.4.140.0130.00817.86
7.4.130.0110.00716.41
7.4.120.0130.00616.43
7.4.110.0140.00316.61
7.4.100.0120.00616.44
7.4.90.0070.01316.52
7.4.80.0120.00419.39
7.4.70.0070.01016.37
7.4.60.0110.00616.45
7.4.50.0050.00016.66
7.4.40.0040.01516.51
7.4.30.0070.01016.71
7.4.00.0070.00714.90
7.3.330.0060.00013.25
7.3.320.0030.00313.29
7.3.310.0040.00316.28
7.3.300.0030.00316.14
7.3.290.0080.00616.26
7.3.280.0080.00816.30
7.3.270.0000.01817.40
7.3.260.0090.00916.39
7.3.250.0070.01116.54
7.3.240.0090.00916.61
7.3.230.0170.00016.40
7.3.210.0060.01216.46
7.3.200.0060.01616.57
7.3.190.0090.00916.39
7.3.180.0030.01916.25
7.3.170.0030.01416.45
7.3.160.0000.01516.57
7.2.330.0090.00916.77
7.2.320.0070.01016.72
7.2.310.0140.00316.45
7.2.300.0060.01216.58
7.2.290.0130.00316.70
7.2.60.0070.00716.99
7.2.00.0060.01218.96
7.1.200.0030.00615.80
7.1.100.0000.01117.90
7.1.70.0090.00017.16
7.1.60.0040.02219.32
7.1.50.0100.01316.95
7.1.00.0000.08022.57
7.0.200.0030.00316.79
7.0.140.0000.07722.10
7.0.70.5170.03719.98
7.0.60.0070.07719.92
7.0.50.0030.04017.88
7.0.40.0100.08320.12
7.0.30.0570.07320.09
7.0.20.0300.04720.25
7.0.10.0170.04320.06
7.0.00.0130.08020.25
5.6.280.0030.07321.14
5.6.210.0070.08720.72
5.6.200.0030.07718.18
5.6.190.0200.02720.57
5.6.180.0130.08020.38
5.6.170.0300.07720.47
5.6.160.0070.04320.47
5.6.150.0030.05318.19
5.6.140.0100.07018.21
5.6.130.0030.04318.23
5.6.120.0030.08021.00
5.6.110.0200.05320.99
5.6.100.0030.07320.98
5.6.90.0070.08320.98
5.6.80.0100.05720.39
5.6.70.0030.08020.36
5.5.350.0030.08020.30
5.5.340.0030.05718.08
5.5.330.0070.08720.30
5.5.320.0070.08320.38
5.5.310.0230.07720.33
5.5.300.0070.04318.10
5.5.290.0130.07717.97
5.5.280.0130.07720.68
5.5.270.0030.04720.88
5.5.260.0130.05720.84
5.5.250.0170.07020.57
5.5.240.0100.07020.12
5.4.450.1900.04319.64
5.4.440.1930.05019.32
5.4.430.2270.04319.30
5.4.420.2470.03319.54
5.4.410.2070.03719.25
5.4.400.2300.03719.09
5.4.390.1930.04019.23
5.4.380.1900.04019.22
5.4.370.1900.03719.16
5.4.360.1870.04019.13
5.4.350.1830.04019.13
5.4.340.1900.03718.87
5.4.320.1870.03719.06
5.4.310.1370.03719.08
5.4.300.0000.04019.08
5.4.290.0100.06719.07
5.4.280.1230.05318.94
5.4.270.2330.04019.21
5.4.260.2000.04319.14
5.4.250.2300.03719.21
5.4.240.2170.03718.88
5.4.230.2030.04319.21
5.4.220.1970.04719.23
5.4.210.1900.04018.94
5.4.200.2100.04019.12
5.4.190.2100.04319.29
5.4.180.2030.04019.20
5.4.170.2030.04019.20
5.4.160.2100.03719.14
5.4.150.2100.04319.20
5.4.140.1870.04316.33
5.4.130.1870.03716.30
5.4.120.2130.03316.49
5.4.110.1800.04016.55
5.4.100.2170.04316.45
5.4.90.2130.03316.45
5.4.80.1870.03716.34
5.4.70.0070.04016.48
5.4.60.0000.03716.18
5.4.50.0300.04016.34
5.4.40.1600.03716.53
5.4.30.1770.03316.55
5.4.20.2170.04716.52
5.4.10.1730.03716.16
5.4.00.2300.03015.97
5.3.290.0370.03714.72
5.3.280.0000.08714.50
5.3.270.0170.04014.75
5.3.260.1730.04014.83
5.3.250.1670.03314.68
5.3.240.1600.04014.60
5.3.230.1700.03314.51
5.3.220.1770.04014.71
5.3.210.0200.03314.54
5.3.200.0130.04014.79
5.3.190.0100.04314.54
5.3.180.0200.03314.57
5.3.170.0100.04314.49
5.3.160.0300.03314.57
5.3.150.0230.04714.57
5.3.140.0070.04314.53
5.3.130.0170.04014.70
5.3.120.0170.03714.49
5.3.110.0230.04014.56
5.3.100.0200.04014.26
5.3.90.0200.03013.94
5.3.80.0170.04713.93
5.3.70.0100.05013.95
5.3.60.0170.03314.02
5.3.50.0030.04713.95
5.3.40.0100.04314.18
5.3.30.0130.03714.15
5.3.20.0200.03013.84
5.3.10.0130.03713.74
5.3.00.0230.04013.73
5.2.170.0130.03011.00
5.2.160.0070.04011.20
5.2.150.0070.03711.05
5.2.140.0170.03311.22
5.2.130.0170.03310.96
5.2.120.0170.02310.94
5.2.110.0200.02711.00
5.2.100.0170.02311.18
5.2.90.0130.02710.94
5.2.80.0070.03310.93
5.2.70.0100.03711.04
5.2.60.0130.02710.90
5.2.50.0200.02711.09
5.2.40.0100.03011.04
5.2.30.0100.03010.86
5.2.20.0100.03011.01
5.2.10.0130.02710.78
5.2.00.0170.02310.78
5.1.60.0070.03010.00
5.1.50.0200.0139.97
5.1.40.0330.02010.15
5.1.30.0130.02310.31
5.1.20.0070.03010.42
5.1.10.0100.0309.96
5.1.00.0170.05010.12
5.0.50.0270.0278.52
5.0.40.0070.0238.45
5.0.30.0070.0308.12
5.0.20.0030.0208.20
5.0.10.0030.0278.09
5.0.00.0070.0308.23
4.4.90.0030.0237.70
4.4.80.0030.0207.70
4.4.70.0070.0177.70
4.4.60.0070.0137.70
4.4.50.0070.0137.70
4.4.40.0070.0237.70
4.4.30.0070.0137.70
4.4.20.0030.0277.70
4.4.10.0030.0237.70
4.4.00.0130.0277.70
4.3.110.0100.0207.70
4.3.100.0070.0177.70
4.3.90.0070.0137.70
4.3.80.0070.0237.70
4.3.70.0030.0177.70
4.3.60.0070.0377.70
4.3.50.0130.0207.70
4.3.40.0030.0277.70
4.3.30.0000.0177.70
4.3.20.0000.0207.70
4.3.10.0030.0177.70
4.3.00.0000.0177.70

preferences:
47.86 ms | 401 KiB | 5 Q