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('x','y')))))); 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.0040.01118.31
8.3.50.0100.00821.27
8.3.40.0030.01318.84
8.3.30.0140.00019.07
8.3.20.0040.00420.34
8.3.10.0040.00420.58
8.3.00.0080.00319.38
8.2.180.0160.00625.92
8.2.170.0120.00619.04
8.2.160.0090.00622.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00222.23
8.2.110.0030.00621.96
8.2.100.0090.00317.72
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0030.00517.38
8.2.60.0000.00817.80
8.2.50.0000.01018.07
8.2.40.0040.00418.05
8.2.30.0000.00818.14
8.2.20.0030.00617.69
8.2.10.0040.00418.14
8.2.00.0060.00317.74
8.1.280.0040.01125.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00623.80
8.1.230.0080.00420.91
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0050.00317.23
8.1.180.0020.00518.10
8.1.170.0000.00818.41
8.1.160.0000.00721.93
8.1.150.0050.00318.83
8.1.140.0040.00417.49
8.1.130.0070.00017.70
8.1.120.0040.00417.38
8.1.110.0040.00417.36
8.1.100.0070.00017.46
8.1.90.0030.00517.45
8.1.80.0000.00817.42
8.1.70.0030.00617.47
8.1.60.0060.00317.63
8.1.50.0030.00517.57
8.1.40.0020.00517.34
8.1.30.0000.00917.67
8.1.20.0070.00017.64
8.1.10.0000.00717.54
8.1.00.0040.00417.52
8.0.300.0080.00018.77
8.0.290.0080.00316.63
8.0.280.0030.00318.49
8.0.270.0030.00317.25
8.0.260.0080.00017.21
8.0.250.0030.00316.85
8.0.240.0000.00616.92
8.0.230.0000.00716.86
8.0.220.0030.00316.88
8.0.210.0030.00316.77
8.0.200.0000.00616.95
8.0.190.0050.00316.99
8.0.180.0050.00216.82
8.0.170.0080.00016.90
8.0.160.0030.00616.86
8.0.150.0050.00216.91
8.0.140.0050.00316.85
8.0.130.0080.00013.28
8.0.120.0000.00716.85
8.0.110.0050.00316.86
8.0.100.0030.00516.74
8.0.90.0050.00316.88
8.0.80.0100.01016.84
8.0.70.0040.00416.89
8.0.60.0020.00516.67
8.0.50.0000.00716.95
8.0.30.0090.00917.16
8.0.20.0150.00317.40
8.0.10.0050.00216.90
8.0.00.0080.00916.74
7.4.330.0000.00515.10
7.4.320.0000.00616.61
7.4.300.0030.00316.54
7.4.290.0040.00416.61
7.4.280.0060.00316.48
7.4.270.0000.00716.43
7.4.260.0040.00416.38
7.4.250.0000.00816.59
7.4.240.0040.00416.48
7.4.230.0040.00416.58
7.4.220.0140.00416.55
7.4.210.0060.00916.63
7.4.200.0070.00016.52
7.4.160.0040.01116.38
7.4.150.0240.00317.40
7.4.140.0060.01117.86
7.4.130.0080.01016.54
7.4.120.0080.00916.48
7.4.110.0100.00616.30
7.4.100.0090.00916.47
7.4.90.0080.01216.48
7.4.80.0030.01819.39
7.4.70.0120.00616.51
7.4.60.0100.00716.30
7.4.50.0030.00616.54
7.4.40.0080.00816.50
7.4.30.0100.01016.57
7.4.10.0110.00814.60
7.4.00.0080.01014.87
7.3.330.0050.00013.26
7.3.320.0060.00013.05
7.3.310.0000.00716.15
7.3.300.0000.00716.19
7.3.290.0070.01416.28
7.3.280.0110.00716.28
7.3.270.0120.00617.40
7.3.260.0030.01416.45
7.3.250.0100.00916.45
7.3.240.0110.00716.59
7.3.230.0100.00716.53
7.3.210.0080.00816.27
7.3.200.0030.01819.39
7.3.190.0120.00616.48
7.3.180.0090.00916.37
7.3.170.0060.01116.46
7.3.160.0100.00716.50
7.3.130.0070.01314.74
7.3.120.0060.01314.97
7.3.110.0020.01414.52
7.3.100.0060.00814.87
7.3.90.0080.00714.58
7.3.80.0010.01014.60
7.3.70.0070.00514.75
7.3.60.0010.01214.87
7.3.50.0100.00114.79
7.3.40.0040.00914.71
7.3.30.0060.00714.73
7.3.20.0050.00816.71
7.3.10.0060.00916.58
7.3.00.0070.00716.54
7.2.330.0090.01216.71
7.2.320.0090.01216.85
7.2.310.0100.00716.71
7.2.300.0160.00316.50
7.2.290.0120.00916.86
7.2.260.0090.00914.77
7.2.250.0110.00614.77
7.2.240.0070.00815.19
7.2.230.0070.00514.92
7.2.220.0090.00815.04
7.2.210.0100.00314.84
7.2.200.0100.00514.99
7.2.190.0030.01214.79
7.2.180.0100.00314.95
7.2.170.0090.00414.94
7.2.160.0070.00314.86
7.2.150.0030.00617.00
7.2.140.0080.00416.61
7.2.130.0120.00516.86
7.2.120.0120.00416.84
7.2.110.0110.00516.85
7.2.100.0050.00816.75
7.2.90.0080.00716.89
7.2.80.0090.01016.89
7.2.70.0110.01116.92
7.2.60.0090.00916.82
7.2.50.0100.00716.95
7.2.40.0070.00916.86
7.2.30.0090.00616.94
7.2.20.0090.00716.83
7.2.10.0090.00716.88
7.2.00.0090.00916.90
7.1.330.0070.00815.69
7.1.320.0040.00715.75
7.1.310.0040.01115.75
7.1.300.0080.00515.62
7.1.290.0040.01015.65
7.1.280.0070.00615.74
7.1.270.0050.01015.79
7.1.260.0050.00615.85
7.1.250.0090.00815.79
7.1.240.0030.01015.85
7.1.230.0020.01015.80
7.1.220.0050.00515.74
7.1.210.0020.01415.73
7.1.200.0050.00915.90
7.1.190.0040.00915.92
7.1.180.0050.00715.81
7.1.170.0050.00915.51
7.1.160.0040.00815.89
7.1.150.0060.00615.86
7.1.140.0030.01015.71
7.1.130.0050.00915.55
7.1.120.0040.00815.90
7.1.110.0090.00415.82
7.1.100.0070.00315.55
7.1.90.0070.00515.68
7.1.80.0100.00315.78
7.1.70.0060.00516.12
7.1.60.0100.00616.33
7.1.50.0090.00716.29
7.1.40.0100.00215.80
7.1.30.0050.00715.78
7.1.20.0070.00715.70
7.1.10.0020.01115.92
7.1.00.0080.03017.84
7.0.330.0050.00615.46
7.0.320.0040.00615.33
7.0.310.0070.00315.34
7.0.300.0040.00615.14
7.0.290.0090.00515.43
7.0.280.0050.00715.36
7.0.270.0050.00715.47
7.0.260.0070.00415.56
7.0.250.0050.00515.41
7.0.240.0060.00615.41
7.0.230.0060.00615.33
7.0.220.0060.00815.40
7.0.210.0080.00515.48
7.0.200.0050.01115.93
7.0.190.0030.01015.46
7.0.180.0090.00315.47
7.0.170.0040.01215.43
7.0.160.0120.00515.30
7.0.150.0080.00615.47
7.0.140.0080.02617.60
7.0.130.0060.00615.57
7.0.120.0090.00615.33
7.0.110.0070.00615.51
7.0.100.0030.00815.40
7.0.90.0030.00815.47
7.0.80.0060.00615.56
7.0.70.0040.00815.51
7.0.60.0070.03016.93
7.0.50.0060.02916.25
7.0.40.0040.02115.58
7.0.30.0100.02015.83
7.0.20.0160.02915.65
7.0.10.0050.02215.72
7.0.00.0050.02015.78
5.6.400.0030.00914.40
5.6.390.0000.00914.05
5.6.380.0070.00714.23
5.6.370.0050.00514.21
5.6.360.0070.00414.29
5.6.350.0050.00514.58
5.6.340.0050.00514.62
5.6.330.0090.00514.58
5.6.320.0060.00914.39
5.6.310.0040.00914.42
5.6.300.0050.00714.34
5.6.290.0050.00814.37
5.6.280.0050.03016.73
5.6.270.0090.00514.29
5.6.260.0130.00014.44
5.6.250.0060.00714.36
5.6.240.0050.01114.53
5.6.230.0060.00814.37
5.6.220.0090.00514.39
5.6.210.0070.03216.43
5.6.200.0040.02015.75
5.6.190.0070.02816.47
5.6.180.0130.02216.50
5.6.170.0130.03116.40
5.6.160.0070.03216.54
5.6.150.0030.03315.75
5.6.140.0040.03515.72
5.6.130.0050.02015.70
5.6.120.0080.03016.54
5.6.110.0060.03416.57
5.6.100.0070.02716.66
5.6.90.0070.02816.61
5.6.80.0100.02416.44
5.6.70.0050.01014.43
5.6.60.0080.00514.34
5.6.50.0080.00514.40
5.6.40.0060.00714.29
5.6.30.0070.00514.51
5.6.20.0090.00314.46
5.6.10.0030.00814.27
5.6.00.0050.00814.41
5.5.380.0050.00712.87
5.5.370.0090.00412.88
5.5.360.0080.00513.00
5.5.350.0070.03315.32
5.5.340.0050.02314.53
5.5.330.0040.02115.26
5.5.320.0160.01615.20
5.5.310.0150.02915.20
5.5.300.0060.03014.52
5.5.290.0040.01814.47
5.5.280.0090.02215.38
5.5.270.0070.02115.50
5.5.260.0040.03315.65
5.5.250.0050.02215.30
5.5.240.0130.02515.24
5.5.230.0050.00712.69
5.5.220.0020.00712.90
5.5.210.0070.00612.71
5.5.200.0040.00912.64
5.5.190.0070.00412.82
5.5.180.0010.01012.76
5.5.170.0110.00212.77
5.5.160.0020.00912.85
5.5.150.0070.00612.74
5.5.140.0070.00312.70
5.5.130.0040.00712.83
5.5.120.0040.00612.67
5.5.110.0080.00312.81
5.5.100.0050.00912.85
5.5.90.0040.00612.91
5.5.80.0030.00612.60
5.5.70.0030.00612.74
5.5.60.0070.00212.88
5.5.50.0070.00212.64
5.5.40.0030.00912.63
5.5.30.0040.00712.90
5.5.20.0020.00912.74
5.5.10.0060.00812.76
5.5.00.0030.00612.86
5.4.450.0220.01813.95
5.4.440.0310.01913.99
5.4.430.0210.01613.84
5.4.420.0230.00513.89
5.4.410.0260.00213.98
5.4.400.0330.00213.68
5.4.390.0220.00513.90
5.4.380.0250.00213.94
5.4.370.0240.00413.72
5.4.360.0220.00613.84
5.4.350.0220.00513.84
5.4.340.0240.00313.89
5.4.330.0010.00811.34
5.4.320.0030.01611.59
5.4.310.0050.01611.53
5.4.300.0040.01911.55
5.4.290.0040.01611.46
5.4.280.0060.01411.53
5.4.270.0050.01511.64
5.4.260.0020.01911.57
5.4.250.0050.01611.53
5.4.240.0060.01411.37
5.4.230.0050.01411.54
5.4.220.0040.01611.47
5.4.210.0020.01911.57
5.4.200.0070.01511.57
5.4.190.0030.01811.66
5.4.180.0030.01611.52
5.4.170.0050.01511.51
5.4.160.0060.01511.43
5.4.150.0060.01611.67
5.4.140.0060.01611.40
5.4.130.0060.01511.47
5.4.120.0070.01511.46
5.4.110.0030.02011.54
5.4.100.0060.01411.40
5.4.90.0050.01611.25
5.4.80.0030.01811.36
5.4.70.0040.01511.43
5.4.60.0020.01811.35
5.4.50.0050.01511.31
5.4.40.0050.01511.56
5.4.30.0040.01611.32
5.4.20.0040.02211.44
5.4.10.0050.01411.29
5.4.00.0060.01511.26
5.3.290.0090.02511.85
5.3.280.0050.02411.80
5.3.270.0080.01911.81
5.3.260.0050.02411.81
5.3.250.0030.02511.81
5.3.240.0060.02011.81
5.3.230.0050.02911.80
5.3.220.0130.02111.79
5.3.210.0100.02411.79
5.3.200.0060.02111.79
5.3.190.0070.02011.79
5.3.180.0040.02111.79
5.3.170.0040.02311.78
5.3.160.0060.02111.79
5.3.150.0040.02011.79
5.3.140.0070.01811.78
5.3.130.0060.02211.78
5.3.120.0030.02311.78
5.3.110.0040.02211.78
5.3.100.0070.02011.51
5.3.90.0040.02211.50
5.3.80.0020.02311.50
5.3.70.0070.01811.50
5.3.60.0040.02111.49
5.3.50.0070.02011.46
5.3.40.0040.02111.46
5.3.30.0040.02011.44
5.3.20.0050.02011.33
5.3.10.0040.02011.32
5.3.00.0060.02011.31
5.2.170.0060.01610.04
5.2.160.0010.01810.04
5.2.150.0040.01610.04
5.2.140.0040.01710.04
5.2.130.0060.01410.02
5.2.120.0030.01710.02
5.2.110.0040.01510.02
5.2.100.0050.01610.02
5.2.90.0040.01510.02
5.2.80.0040.01810.02
5.2.70.0050.01610.02
5.2.60.0020.02010.00
5.2.50.0040.0159.98
5.2.40.0020.0199.96
5.2.30.0040.0189.96
5.2.20.0030.0189.95
5.2.10.0030.0179.91
5.2.00.0040.0169.84
5.1.60.0020.0149.48
5.1.50.0040.0139.48
5.1.40.0020.0169.47
5.1.30.0050.0139.65
5.1.20.0040.0149.66
5.1.10.0050.0139.52
5.1.00.0050.0139.52
5.0.50.0060.0108.76
5.0.40.0030.0128.69
5.0.30.0020.0178.60
5.0.20.0020.0138.58
5.0.10.0040.0108.57
5.0.00.0020.0178.57
4.4.90.0010.0127.84
4.4.80.0030.0107.83
4.4.70.0020.0097.83
4.4.60.0030.0097.83
4.4.50.0030.0087.84
4.4.40.0030.0147.80
4.4.30.0010.0117.83
4.4.20.0020.0097.87
4.4.10.0010.0127.88
4.4.00.0040.0127.83
4.3.110.0030.0107.78
4.3.100.0020.0097.78
4.3.90.0020.0097.77
4.3.80.0040.0117.74
4.3.70.0010.0097.76
4.3.60.0040.0077.76
4.3.50.0040.0077.76
4.3.40.0020.0137.72
4.3.30.0030.0097.09
4.3.20.0030.0107.08
4.3.10.0000.0117.06
4.3.00.0030.00812.24

preferences:
56.71 ms | 401 KiB | 5 Q