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(4,5,6),'gamma',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.0120.00318.36
8.3.50.0130.00921.14
8.3.40.0090.00618.97
8.3.30.0140.00319.18
8.3.20.0030.00620.07
8.3.10.0050.00320.52
8.3.00.0040.00419.38
8.2.180.0130.00616.36
8.2.170.0070.01122.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0070.00021.88
8.2.110.0050.00520.32
8.2.100.0070.00418.03
8.2.90.0040.00419.34
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0000.00817.80
8.2.50.0070.00318.07
8.2.40.0000.00718.22
8.2.30.0040.00418.11
8.2.20.0000.00717.64
8.2.10.0050.00218.00
8.2.00.0000.00717.67
8.1.280.0120.00325.92
8.1.270.0050.00322.20
8.1.260.0030.00526.35
8.1.250.0000.00828.09
8.1.240.0050.00523.91
8.1.230.0000.01119.08
8.1.220.0000.00717.79
8.1.210.0050.00318.77
8.1.200.0090.00017.36
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0000.00818.47
8.1.160.0000.00722.02
8.1.150.0000.00818.89
8.1.140.0040.00417.43
8.1.130.0000.00717.88
8.1.120.0000.00717.46
8.1.110.0000.00717.36
8.1.100.0000.00917.39
8.1.90.0030.00617.36
8.1.80.0000.00717.40
8.1.70.0040.00417.38
8.1.60.0000.00917.47
8.1.50.0000.00717.61
8.1.40.0070.00017.41
8.1.30.0000.00817.63
8.1.20.0060.00317.49
8.1.10.0050.00217.44
8.1.00.0070.00017.48
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0070.00018.54
8.0.270.0000.00717.26
8.0.260.0000.00817.23
8.0.250.0070.00017.00
8.0.240.0030.00316.90
8.0.230.0000.00916.92
8.0.220.0000.00716.91
8.0.210.0040.00416.88
8.0.200.0000.00616.89
8.0.190.0040.00416.84
8.0.180.0000.00816.80
8.0.170.0000.00816.96
8.0.160.0080.00016.76
8.0.150.0040.00416.87
8.0.140.0040.00416.70
8.0.130.0080.00013.28
8.0.120.0000.00716.81
8.0.110.0080.00016.85
8.0.100.0030.00516.76
8.0.90.0000.00717.00
8.0.80.0030.01216.86
8.0.70.0050.00216.71
8.0.60.0000.00816.77
8.0.50.0030.00516.89
8.0.30.0070.01117.20
8.0.20.0060.01217.40
8.0.10.0080.00017.06
8.0.00.0100.00716.76
7.4.330.0060.00015.05
7.4.320.0030.00316.48
7.4.300.0060.00016.50
7.4.290.0030.00316.59
7.4.280.0040.00416.64
7.4.270.0000.00716.43
7.4.260.0030.00316.49
7.4.250.0080.00016.60
7.4.240.0030.00416.51
7.4.230.0030.00316.66
7.4.220.0030.01516.54
7.4.210.0150.00016.67
7.4.200.0030.00316.70
7.4.160.0060.01016.71
7.4.150.0030.01617.40
7.4.140.0100.00917.86
7.4.130.0060.01516.58
7.4.120.0100.00816.47
7.4.110.0070.01116.71
7.4.100.0070.01116.52
7.4.90.0060.01816.56
7.4.80.0070.01719.39
7.4.70.0060.01016.46
7.4.60.0080.00916.45
7.4.50.0000.00616.55
7.4.40.0110.00516.57
7.4.30.0110.00816.40
7.4.00.0040.01215.14
7.3.330.0060.00013.23
7.3.320.0000.00613.17
7.3.310.0000.00716.33
7.3.300.0030.00316.16
7.3.290.0120.00816.31
7.3.280.0090.01016.31
7.3.270.0100.01017.40
7.3.260.0110.00716.50
7.3.250.0150.00316.42
7.3.240.0100.01016.66
7.3.230.0080.00816.39
7.3.210.0160.00416.32
7.3.200.0220.00019.39
7.3.190.0170.00316.52
7.3.180.0070.01016.23
7.3.170.0060.01016.33
7.3.160.0060.01016.41
7.2.330.0040.01416.51
7.2.320.0100.00616.71
7.2.310.0060.01616.54
7.2.300.0070.01016.74
7.2.290.0080.01516.50
7.2.00.0030.01218.91
7.1.100.0000.01118.28
7.1.70.0000.00916.92
7.1.60.0100.01419.32
7.1.50.0090.00917.02
7.1.00.0030.07722.57
7.0.200.0030.00616.88
7.0.140.0070.07022.12
7.0.60.0170.07320.00
7.0.50.0170.07317.89
7.0.40.0070.04020.15
7.0.30.0130.04720.07
7.0.20.0230.05320.33
7.0.10.0070.09020.23
7.0.00.0130.08020.11
5.6.280.0100.06721.03
5.6.210.0070.08720.54
5.6.200.0070.09018.18
5.6.190.0070.04020.55
5.6.180.0030.06320.61
5.6.170.0270.03720.48
5.6.160.0070.05720.44
5.6.150.0100.04318.19
5.6.140.0070.07318.21
5.6.130.0000.07018.23
5.6.120.0070.08020.98
5.6.110.0070.07320.89
5.6.100.0170.05320.98
5.6.90.0070.04321.00
5.6.80.0070.08020.51
5.5.350.0300.07320.34
5.5.340.0070.07018.09
5.5.330.0070.05720.31
5.5.320.0230.07320.35
5.5.310.0230.03720.41
5.5.300.0070.05718.09
5.5.290.0100.06318.03
5.5.280.0070.05720.85
5.5.270.0030.05020.79
5.5.260.0100.08020.84
5.5.250.0100.05020.67
5.5.240.0030.07720.37
5.4.450.1230.04719.35
5.4.440.1600.04019.54
5.4.430.0500.03319.56
5.4.420.0670.00019.41
5.4.410.0630.00019.57
5.4.400.0630.00019.09
5.4.390.0600.00019.04
5.4.380.0670.00019.04
5.4.370.0630.00019.13
5.4.360.0600.00019.09
5.4.350.0670.00019.27
5.4.340.0630.00019.03
5.4.320.0050.03912.50
5.4.310.0040.04112.50
5.4.300.0060.03712.50
5.4.290.0030.04212.50
5.4.280.0070.03512.39
5.4.270.0070.03612.40
5.4.260.0050.04212.39
5.4.250.0100.04812.40
5.4.240.0060.04012.39
5.4.230.0070.04112.38
5.4.220.0080.04612.39
5.4.210.0070.03812.39
5.4.200.0020.04112.38
5.4.190.0080.03712.38
5.4.180.0050.04312.38
5.4.170.0030.04212.40
5.4.160.0090.03712.39
5.4.150.0060.03512.39
5.4.140.0060.04012.07
5.4.130.0060.03712.06
5.4.120.0070.03912.02
5.4.110.0060.03512.02
5.4.100.0060.03612.01
5.4.90.0060.04012.01
5.4.80.0060.03712.01
5.4.70.0080.03912.01
5.4.60.0060.03512.01
5.4.50.0090.03712.01
5.4.40.0090.03212.00
5.4.30.0060.03911.99
5.4.20.0080.03512.00
5.4.10.0070.03912.00
5.4.00.0110.03211.48
5.3.290.0050.04712.80
5.3.280.0100.04212.71
5.3.270.0070.03712.72
5.3.260.0070.04412.72
5.3.250.0090.03512.72
5.3.240.0040.04012.72
5.3.230.0120.03312.71
5.3.220.0050.03912.68
5.3.210.0040.04412.68
5.3.200.0070.04312.68
5.3.190.0040.04112.68
5.3.180.0060.04112.67
5.3.170.0080.03512.67
5.3.160.0080.03712.67
5.3.150.0100.03612.67
5.3.140.0110.03112.66
5.3.130.0090.03612.66
5.3.120.0060.03912.66
5.3.110.0040.04612.66
5.3.100.0050.03812.12
5.3.90.0080.03512.10
5.3.80.0060.04412.09
5.3.70.0060.03612.09
5.3.60.0050.04412.07
5.3.50.0070.03512.02
5.3.40.0080.04212.03
5.3.30.0080.04711.98
5.3.20.0050.03811.77
5.3.10.0050.03711.73
5.3.00.0050.04511.72
5.2.170.0050.0319.18
5.2.160.0060.0309.18
5.2.150.0030.0409.18
5.2.140.0060.0379.18
5.2.130.0030.0369.14
5.2.120.0060.0289.14
5.2.110.0040.0349.14
5.2.100.0050.0329.14
5.2.90.0060.0299.14
5.2.80.0050.0369.14
5.2.70.0040.0319.14
5.2.60.0110.0329.09
5.2.50.0050.0319.06
5.2.40.0060.0359.03
5.2.30.0070.0319.02
5.2.20.0070.0289.01
5.2.10.0040.0308.93
5.2.00.0060.0288.78
5.1.60.0040.0248.07
5.1.50.0020.0328.06
5.1.40.0040.0288.05
5.1.30.0040.0308.40
5.1.20.0050.0308.42
5.1.10.0040.0298.14
5.1.00.0020.0278.14
5.0.50.0040.0276.63
5.0.40.0050.0186.48
5.0.30.0020.0336.29
5.0.20.0040.0196.26
5.0.10.0060.0176.24
5.0.00.0040.0326.24
4.4.90.0020.0164.78
4.4.80.0020.0174.76
4.4.70.0020.0164.75
4.4.60.0030.0204.76
4.4.50.0030.0144.77
4.4.40.0050.0234.71
4.4.30.0040.0164.76
4.4.20.0040.0154.84
4.4.10.0020.0194.85
4.4.00.0040.0234.75
4.3.110.0020.0194.67
4.3.100.0050.0124.67
4.3.90.0020.0154.63
4.3.80.0010.0254.58
4.3.70.0050.0124.63
4.3.60.0040.0134.63
4.3.50.0000.0184.62
4.3.40.0010.0254.54
4.3.30.0040.0193.28
4.3.20.0040.0193.26
4.3.10.0000.0173.22
4.3.00.0200.01713.59

preferences:
46.59 ms | 401 KiB | 5 Q