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('gamma','epsilon',array(11,12))))); array_walk($array, $callback); print_r($nu_array); /** 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.0110.00418.68
8.3.50.0050.01322.00
8.3.40.0120.00318.70
8.3.30.0070.00719.21
8.3.20.0050.00220.33
8.3.10.0040.00420.32
8.3.00.0040.00419.25
8.2.180.0070.01018.25
8.2.170.0040.01122.96
8.2.160.0070.00719.29
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00020.94
8.2.110.0060.00320.52
8.2.100.0040.00818.22
8.2.90.0050.00319.17
8.2.80.0050.00317.97
8.2.70.0000.00817.75
8.2.60.0040.00418.03
8.2.50.0040.00718.07
8.2.40.0080.00018.22
8.2.30.0000.00818.07
8.2.20.0000.00717.75
8.2.10.0050.00318.18
8.2.00.0070.00017.73
8.1.280.0150.00625.92
8.1.270.0040.00423.96
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0000.01023.98
8.1.230.0070.00419.00
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00717.36
8.1.180.0000.00718.10
8.1.170.0000.00818.59
8.1.160.0000.00722.00
8.1.150.0040.00418.80
8.1.140.0070.00017.37
8.1.130.0040.00417.89
8.1.120.0050.00317.39
8.1.110.0040.00417.33
8.1.100.0060.00317.37
8.1.90.0000.00717.35
8.1.80.0070.00017.48
8.1.70.0000.00717.36
8.1.60.0000.00817.48
8.1.50.0040.00717.41
8.1.40.0000.00817.44
8.1.30.0050.00317.45
8.1.20.0030.00517.70
8.1.10.0040.00417.62
8.1.00.0000.00717.34
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0070.00018.49
8.0.270.0030.00317.13
8.0.260.0000.00717.13
8.0.250.0000.00717.00
8.0.240.0050.00316.97
8.0.230.0070.00016.94
8.0.220.0000.00816.90
8.0.210.0000.00816.79
8.0.200.0060.00016.82
8.0.190.0000.00816.95
8.0.180.0000.00816.89
8.0.170.0040.00417.00
8.0.160.0060.00316.85
8.0.150.0040.00316.84
8.0.140.0040.00416.80
8.0.130.0000.00613.25
8.0.120.0080.00016.82
8.0.110.0070.00016.81
8.0.100.0000.00716.75
8.0.90.0000.00716.94
8.0.80.0030.01216.93
8.0.70.0080.00016.88
8.0.60.0080.00016.78
8.0.50.0000.00816.88
8.0.30.0100.01017.00
8.0.20.0100.00917.40
8.0.10.0050.00317.00
8.0.00.0140.00616.96
7.4.330.0050.00015.00
7.4.320.0030.00316.61
7.4.300.0000.00616.57
7.4.290.0000.00716.49
7.4.280.0090.00016.40
7.4.270.0000.00716.63
7.4.260.0030.00316.38
7.4.250.0000.00716.55
7.4.240.0050.00216.48
7.4.230.0040.00416.33
7.4.220.0060.02016.59
7.4.210.0060.01116.55
7.4.200.0030.00416.70
7.4.160.0030.01316.50
7.4.150.0100.01017.40
7.4.140.0130.00417.86
7.4.130.0110.01016.49
7.4.120.0080.00916.58
7.4.110.0140.00316.57
7.4.100.0070.01016.53
7.4.90.0030.01316.66
7.4.80.0060.01019.39
7.4.70.0120.00916.48
7.4.60.0110.01116.57
7.4.50.0040.00416.55
7.4.40.0100.00716.44
7.4.30.0120.00916.52
7.4.00.0130.00315.11
7.3.330.0000.00613.13
7.3.320.0000.00613.31
7.3.310.0000.00716.38
7.3.300.0070.00016.31
7.3.290.0090.00616.26
7.3.280.0080.01016.29
7.3.270.0040.01317.40
7.3.260.0090.00916.55
7.3.250.0090.00816.53
7.3.240.0090.00916.32
7.3.230.0100.00716.50
7.3.210.0060.01016.39
7.3.200.0090.01219.39
7.3.190.0120.00816.59
7.3.180.0110.00516.44
7.3.170.0100.00616.32
7.3.160.0040.01216.51
7.3.10.0060.00616.65
7.3.00.0060.00616.60
7.2.330.0130.00316.46
7.2.320.0070.01016.68
7.2.310.0040.01816.48
7.2.300.0030.01316.56
7.2.290.0090.00916.67
7.2.130.0120.00416.91
7.2.120.0100.00716.56
7.2.110.0100.00316.72
7.2.100.0000.00917.04
7.2.90.0030.00916.64
7.2.80.0080.00516.71
7.2.70.0040.01216.85
7.2.60.0050.01116.60
7.2.50.0070.00816.88
7.2.40.0100.00717.09
7.2.30.0090.00616.50
7.2.20.0090.00616.71
7.2.10.0070.00716.93
7.2.00.0040.01116.98
7.1.250.0090.00615.63
7.1.240.0080.00815.93
7.1.230.0090.00315.91
7.1.220.0070.00315.65
7.1.210.0000.01415.59
7.1.200.0130.00715.81
7.1.190.0100.00315.71
7.1.180.0060.00615.81
7.1.170.0060.00316.01
7.1.160.0040.01015.90
7.1.150.0030.00915.73
7.1.140.0060.00315.66
7.1.130.0050.00315.59
7.1.120.0040.00715.96
7.1.110.0100.00715.64
7.1.100.0070.00715.88
7.1.90.0070.01015.87
7.1.80.0070.00715.97
7.1.70.0050.00516.38
7.1.60.0110.00717.61
7.1.50.0090.00216.39
7.1.40.0060.00615.69
7.1.30.0120.00815.82
7.1.20.0030.00715.50
7.1.10.0110.00715.75
7.1.00.0000.04419.14
7.0.330.0040.00715.39
7.0.320.0060.00615.24
7.0.310.0060.00615.45
7.0.300.0090.00315.34
7.0.290.0070.01015.34
7.0.280.0030.00915.44
7.0.270.0040.00715.51
7.0.260.0070.00715.17
7.0.250.0040.00715.36
7.0.240.0040.00415.39
7.0.230.0090.00615.39
7.0.220.0000.01815.53
7.0.210.0070.00715.56
7.0.200.0000.00916.04
7.0.190.0070.00315.21
7.0.180.0090.00315.55
7.0.170.0060.00615.41
7.0.160.0070.00715.51
7.0.150.0060.00615.35
7.0.140.0050.04018.79
7.0.130.0030.00715.27
7.0.120.0060.00915.33
7.0.110.0080.00415.35
7.0.100.0040.00415.20
7.0.90.0060.00915.36
7.0.80.0070.01115.63
7.0.70.0050.00215.23
7.0.60.0040.04517.59
7.0.50.0020.04816.60
7.0.40.0050.02316.73
7.0.30.0120.02316.83
7.0.20.0120.04516.88
7.0.10.0100.04316.80
7.0.00.0060.02416.87
5.6.380.0030.01314.20
5.6.370.0110.00014.32
5.6.360.0040.01114.65
5.6.350.0030.00514.55
5.6.340.0060.00314.71
5.6.330.0070.00714.14
5.6.320.0070.00414.30
5.6.310.0160.00014.38
5.6.300.0060.00614.28
5.6.290.0030.00714.44
5.6.280.0070.00714.36
5.6.270.0060.00914.31
5.6.260.0080.00314.80
5.6.250.0060.00614.46
5.6.240.0030.01014.05
5.6.230.0090.00614.30
5.6.220.0090.00614.27
5.6.210.0050.02717.53
5.6.200.0050.02516.41
5.6.190.0070.02917.41
5.6.180.0170.02517.57
5.6.170.0170.02517.31
5.6.160.0080.04617.41
5.6.150.0060.04516.22
5.6.140.0070.04316.18
5.6.130.0090.03516.22
5.6.120.0120.03217.47
5.6.110.0170.03517.75
5.6.100.0060.02717.65
5.6.90.0050.04517.71
5.6.80.0030.02817.37
5.6.70.0060.00914.28
5.6.60.0060.00614.39
5.6.50.0040.00814.12
5.6.40.0100.01013.93
5.6.30.0070.00714.26
5.6.20.0150.00714.23
5.6.10.0160.00314.24
5.6.00.0030.01214.26
5.5.380.0000.00811.29
5.5.370.0000.00511.37
5.5.360.0000.01211.49
5.5.350.0120.03815.93
5.5.340.0080.02014.46
5.5.330.0020.03315.71
5.5.320.0220.04015.65
5.5.310.0160.03515.72
5.5.300.0070.04214.54
5.5.290.0020.02414.69
5.5.280.0060.02316.05
5.5.270.0050.04616.05
5.5.260.0070.03716.13
5.5.250.0120.02015.78
5.5.240.0140.03815.82
5.5.230.0040.01211.07
5.5.220.0060.00611.17
5.5.210.0070.00711.23
5.5.200.0030.00911.36
5.5.190.0070.00311.07
5.5.180.0060.00610.80
5.5.170.0000.00611.15
5.5.160.0040.00411.41
5.5.150.0090.00611.12
5.5.140.0040.00710.96
5.5.130.0040.00811.33
5.5.120.0050.00311.37
5.5.110.0180.00311.07
5.5.100.0040.00411.25
5.5.90.0080.00811.22
5.5.80.0060.00610.73
5.5.70.0060.00610.87
5.5.60.0220.00011.17
5.5.50.0030.01011.18
5.5.40.0030.01011.26
5.5.30.0060.00311.32
5.5.20.0090.00611.14
5.5.10.0080.00411.39
5.5.00.0110.00711.21
5.4.450.0130.02315.37
5.4.440.0350.02715.35
5.4.430.0220.02015.17
5.4.420.0350.00415.36
5.4.410.0330.00315.29
5.4.400.0360.00215.01
5.4.390.0390.00015.03
5.4.380.0420.00515.24
5.4.370.0330.00114.99
5.4.360.0350.00315.10
5.4.350.0440.00415.12
5.4.340.0320.00414.97
5.4.330.0030.00311.18
5.4.320.0060.02411.64
5.4.310.0060.02511.82
5.4.300.0120.02311.79
5.4.290.0060.02411.80
5.4.280.0050.02511.63
5.4.270.0090.02711.77
5.4.260.0060.03111.54
5.4.250.0060.03111.73
5.4.240.0070.02711.54
5.4.230.0060.02411.65
5.4.220.0060.02211.77
5.4.210.0060.02011.72
5.4.200.0080.02211.63
5.4.190.0110.02011.69
5.4.180.0130.01911.71
5.4.170.0060.02811.68
5.4.160.0050.02211.54
5.4.150.0030.02311.68
5.4.140.0050.02211.63
5.4.130.0080.02111.58
5.4.120.0050.02011.63
5.4.110.0110.02111.61
5.4.100.0020.02811.58
5.4.90.0110.02211.51
5.4.80.0040.02511.58
5.4.70.0030.02411.43
5.4.60.0120.01911.54
5.4.50.0110.01611.49
5.4.40.0050.02011.58
5.4.30.0090.02111.63
5.4.20.0040.02211.30
5.4.10.0060.02111.62
5.4.00.0040.02211.29
5.3.290.0070.02211.65
5.3.280.0060.02111.69
5.3.270.0080.02211.62
5.3.260.0060.02111.61
5.3.250.0050.02211.72
5.3.240.0120.01811.66
5.3.230.0050.02311.64
5.3.220.0080.02011.67
5.3.210.0080.02411.60
5.3.200.0050.02111.62
5.3.190.0090.01811.53
5.3.180.0080.01911.68
5.3.170.0080.01911.70
5.3.160.0050.02511.72
5.3.150.0130.01811.70
5.3.140.0070.01911.69
5.3.130.0090.02711.52
5.3.120.0070.02211.69
5.3.110.0080.02011.72
5.3.100.0160.01511.28
5.3.90.0130.01711.40
5.3.80.0050.02111.30
5.3.70.0070.02111.32
5.3.60.0080.02311.25
5.3.50.0070.02111.16
5.3.40.0100.02111.32
5.3.30.0080.02311.18
5.3.20.0060.02011.19
5.3.10.0090.02111.03
5.3.00.0120.02210.99
5.2.170.0080.0169.62
5.2.160.0070.0169.62
5.2.150.0090.0169.62
5.2.140.0110.0189.62
5.2.130.0070.0159.60
5.2.120.0060.0159.60
5.2.110.0080.0169.60
5.2.100.0080.0169.60
5.2.90.0100.0179.60
5.2.80.0070.0219.60
5.2.70.0110.0149.60
5.2.60.0080.0189.57
5.2.50.0060.0169.56
5.2.40.0080.0189.55
5.2.30.0060.0169.54
5.2.20.0090.0179.53
5.2.10.0090.0169.49
5.2.00.0080.0169.42
5.1.60.0100.0129.06
5.1.50.0100.0139.06
5.1.40.0070.0129.05
5.1.30.0120.0129.23
5.1.20.0080.0139.24
5.1.10.0050.0169.10
5.1.00.0090.0159.10
5.0.50.0070.0118.34
5.0.40.0060.0118.27
5.0.30.0040.0198.18
5.0.20.0070.0108.16
5.0.10.0070.0098.15
5.0.00.0090.0178.15
4.4.90.0030.0097.42
4.4.80.0040.0097.41
4.4.70.0040.0107.41
4.4.60.0040.0097.41
4.4.50.0020.0127.42
4.4.40.0050.0147.38
4.4.30.0050.0097.41
4.4.20.0100.0077.45
4.4.10.0050.0107.45
4.4.00.0050.0197.41
4.3.110.0040.0117.37
4.3.100.0030.0097.36
4.3.90.0030.0097.35
4.3.80.0040.0137.32
4.3.70.0030.0097.35
4.3.60.0030.0087.34
4.3.50.0020.0107.34
4.3.40.0030.0137.29
4.3.30.0020.0106.67
4.3.20.0030.0106.66
4.3.10.0030.0096.64
4.3.00.0020.01111.82

preferences:
59.48 ms | 401 KiB | 5 Q