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_recursive($array, $callback); print_r($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.0140.00018.43
8.3.50.0140.00522.05
8.3.40.0030.01018.85
8.3.30.0150.00319.00
8.3.20.0040.00420.27
8.3.10.0050.00320.36
8.3.00.0040.00419.38
8.2.180.0120.00916.38
8.2.170.0070.00722.96
8.2.160.0070.00720.43
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00322.05
8.2.110.0090.00020.33
8.2.100.0000.01118.03
8.2.90.0080.00019.40
8.2.80.0030.00617.97
8.2.70.0000.00817.63
8.2.60.0040.00417.92
8.2.50.0030.00618.07
8.2.40.0040.00418.34
8.2.30.0040.00418.19
8.2.20.0000.00817.63
8.2.10.0040.00418.05
8.2.00.0030.00617.61
8.1.280.0100.01025.92
8.1.270.0050.00322.17
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.96
8.1.230.0070.00419.16
8.1.220.0050.00217.79
8.1.210.0030.00618.77
8.1.200.0090.00017.35
8.1.190.0050.00317.35
8.1.180.0090.00018.10
8.1.170.0000.00818.63
8.1.160.0040.00422.02
8.1.150.0040.00418.89
8.1.140.0040.00417.39
8.1.130.0000.00817.82
8.1.120.0000.00817.37
8.1.110.0040.00417.45
8.1.100.0000.00817.46
8.1.90.0030.00717.43
8.1.80.0030.00417.39
8.1.70.0040.00417.43
8.1.60.0040.00417.50
8.1.50.0050.00317.42
8.1.40.0000.00817.41
8.1.30.0000.00817.49
8.1.20.0070.00017.60
8.1.10.0050.00217.45
8.1.00.0040.00417.37
8.0.300.0040.00418.77
8.0.290.0050.00316.73
8.0.280.0000.00718.44
8.0.270.0080.00017.12
8.0.260.0080.00017.36
8.0.250.0000.00716.90
8.0.240.0000.00816.90
8.0.230.0080.00016.96
8.0.220.0070.00016.80
8.0.210.0000.00616.79
8.0.200.0030.00316.89
8.0.190.0000.00716.92
8.0.180.0040.00416.90
8.0.170.0040.00416.88
8.0.160.0000.00816.88
8.0.150.0070.00016.73
8.0.140.0070.00016.88
8.0.130.0050.00313.29
8.0.120.0040.00416.83
8.0.110.0040.00416.85
8.0.100.0040.00416.73
8.0.90.0040.00416.72
8.0.80.0100.00616.88
8.0.70.0000.00716.89
8.0.60.0070.00016.93
8.0.50.0000.00716.95
8.0.30.0130.00616.99
8.0.20.0060.01317.40
8.0.10.0040.00416.81
8.0.00.0080.01216.95
7.4.330.0000.00515.00
7.4.320.0030.00316.51
7.4.300.0000.00616.55
7.4.290.0000.00716.52
7.4.280.0000.00716.49
7.4.270.0070.00016.56
7.4.260.0080.00016.42
7.4.250.0070.00016.54
7.4.240.0050.00316.51
7.4.230.0030.00316.57
7.4.220.0050.01416.61
7.4.210.0090.00616.47
7.4.200.0040.00416.63
7.4.160.0070.00716.72
7.4.150.0070.01017.40
7.4.140.0090.00917.86
7.4.130.0110.00716.54
7.4.120.0110.00616.52
7.4.110.0100.00716.71
7.4.100.0100.00616.50
7.4.90.0140.00716.46
7.4.80.0080.01319.39
7.4.70.0060.01216.50
7.4.60.0100.00616.57
7.4.50.0030.00316.35
7.4.40.0030.01316.62
7.4.30.0100.00716.57
7.4.00.0080.00915.13
7.3.330.0000.00713.26
7.3.320.0030.00313.17
7.3.310.0000.00716.26
7.3.300.0000.00716.29
7.3.290.0040.01216.34
7.3.280.0100.00516.28
7.3.270.0140.00317.40
7.3.260.0100.00716.63
7.3.250.0170.00516.42
7.3.240.0110.00616.44
7.3.230.0120.00616.39
7.3.210.0130.00316.31
7.3.200.0060.01316.50
7.3.190.0030.01816.56
7.3.180.0030.01916.41
7.3.170.0100.01016.43
7.3.160.0090.00616.48
7.3.120.0000.01614.89
7.3.110.0030.00614.46
7.3.100.0070.00714.68
7.3.90.0120.00614.83
7.3.80.0000.01514.63
7.3.70.0030.00614.76
7.3.60.0030.01014.86
7.3.50.0090.00614.84
7.3.40.0030.01014.61
7.3.30.0030.01014.57
7.3.20.0040.00816.73
7.3.10.0060.00916.45
7.3.00.0000.01616.75
7.2.330.0120.00916.65
7.2.320.0030.01916.66
7.2.310.0110.00816.51
7.2.300.0090.00916.71
7.2.290.0070.01516.32
7.2.250.0070.01015.09
7.2.240.0030.01714.60
7.2.230.0090.00914.75
7.2.220.0090.00614.75
7.2.210.0070.01015.06
7.2.200.0030.01014.98
7.2.190.0030.00915.06
7.2.180.0060.00615.23
7.2.170.0000.01015.17
7.2.00.0040.01119.17
7.1.330.0150.00015.73
7.1.320.0100.00715.84
7.1.310.0030.00815.82
7.1.300.0120.00415.73
7.1.290.0120.00315.89
7.1.280.0030.01015.81
7.1.270.0060.00615.52
7.1.260.0030.00715.64
7.1.100.0030.01017.86
7.1.70.0040.00417.34
7.1.60.0100.01319.32
7.1.50.0040.01816.77
7.1.00.0100.07022.57
7.0.200.0030.00516.89
7.0.140.0000.07022.18
7.0.60.0100.05320.05
7.0.50.0030.07017.91
7.0.40.0030.05319.96
7.0.30.0230.07320.34
7.0.20.0470.06720.29
7.0.10.0030.09020.10
7.0.00.0070.08020.34
5.6.280.0070.07020.89
5.6.210.0070.04020.50
5.6.200.0030.04318.16
5.6.190.0100.08720.54
5.6.180.0200.04720.49
5.6.170.0170.07020.39
5.6.160.0070.06720.47
5.6.150.0070.03718.12
5.6.140.0130.06018.16
5.6.130.0100.03718.30
5.6.120.0100.05721.05
5.6.110.0030.05721.05
5.6.100.0070.09321.11
5.6.90.0030.04021.00
5.6.80.0170.06320.37
5.5.350.4370.04020.42
5.5.340.0100.07318.08
5.5.330.0030.04320.38
5.5.320.0170.08320.39
5.5.310.0230.04020.38
5.5.300.0030.04018.05
5.5.290.0030.04317.95
5.5.280.0030.04020.88
5.5.270.0130.08020.77
5.5.260.0070.08720.97
5.5.250.0200.07320.59
5.5.240.0100.08320.19
5.4.450.0500.04719.32
5.4.440.0370.04319.47
5.4.430.0270.04319.27
5.4.420.0670.00019.54
5.4.410.0700.00019.11
5.4.400.0630.00019.27
5.4.390.0630.00019.27
5.4.380.0700.00019.13
5.4.370.0630.00018.98
5.4.360.0630.00019.16
5.4.350.0630.00019.03
5.4.340.0630.00019.11
5.4.320.0080.03412.50
5.4.310.0040.04012.50
5.4.300.0060.03712.50
5.4.290.0060.03812.50
5.4.280.0040.03712.39
5.4.270.0080.04112.39
5.4.260.0050.03912.39
5.4.250.0060.04212.39
5.4.240.0060.03612.39
5.4.230.0040.04412.38
5.4.220.0050.03812.39
5.4.210.0040.03812.39
5.4.200.0060.04312.39
5.4.190.0050.04012.38
5.4.180.0060.03712.39
5.4.170.0050.03712.39
5.4.160.0070.04212.39
5.4.150.0090.03312.39
5.4.140.0050.04012.07
5.4.130.0050.03812.06
5.4.120.0080.03312.02
5.4.110.0080.03412.01
5.4.100.0100.03612.02
5.4.90.0070.03812.01
5.4.80.0050.03912.02
5.4.70.0060.04112.00
5.4.60.0050.03612.01
5.4.50.0080.03312.01
5.4.40.0080.03512.00
5.4.30.0070.03711.99
5.4.20.0090.03611.99
5.4.10.0060.03411.99
5.4.00.0090.03711.48
5.3.290.0100.04212.80
5.3.280.0040.04012.71
5.3.270.0100.04312.72
5.3.260.0090.04112.72
5.3.250.0080.04012.72
5.3.240.0080.03812.72
5.3.230.0090.03912.71
5.3.220.0050.03912.68
5.3.210.0060.04612.68
5.3.200.0060.03712.68
5.3.190.0070.03812.68
5.3.180.0050.03812.68
5.3.170.0070.03912.67
5.3.160.0080.04312.68
5.3.150.0060.03812.67
5.3.140.0070.04312.66
5.3.130.0060.04212.66
5.3.120.0090.03712.66
5.3.110.0060.04012.66
5.3.100.0080.04712.12
5.3.90.0080.03512.10
5.3.80.0050.03812.09
5.3.70.0020.04512.09
5.3.60.0060.03612.08
5.3.50.0100.03412.03
5.3.40.0060.03712.03
5.3.30.0100.03111.98
5.3.20.0080.03511.76
5.3.10.0060.03511.73
5.3.00.0060.03911.72
5.2.170.0070.0389.18
5.2.160.0040.0429.18
5.2.150.0090.0329.18
5.2.140.0040.0319.18
5.2.130.0050.0289.14
5.2.120.0120.0289.14
5.2.110.0060.0369.14
5.2.100.0090.0319.14
5.2.90.0040.0319.14
5.2.80.0040.0309.14
5.2.70.0040.0319.13
5.2.60.0030.0329.09
5.2.50.0070.0339.06
5.2.40.0090.0309.03
5.2.30.0050.0329.01
5.2.20.0090.0309.00
5.2.10.0060.0348.93
5.2.00.0040.0378.79
5.1.60.0070.0218.06
5.1.50.0030.0308.06
5.1.40.0080.0278.05
5.1.30.0030.0288.40
5.1.20.0060.0258.41
5.1.10.0040.0288.14
5.1.00.0060.0318.14
5.0.50.0020.0256.63
5.0.40.0050.0186.48
5.0.30.0020.0336.29
5.0.20.0030.0196.27
5.0.10.0030.0206.25
5.0.00.0040.0356.24
4.4.90.0030.0204.78
4.4.80.0050.0184.76
4.4.70.0010.0184.75
4.4.60.0030.0174.76
4.4.50.0020.0194.77
4.4.40.0030.0304.71
4.4.30.0020.0204.76
4.4.20.0060.0164.85
4.4.10.0020.0204.85
4.4.00.0020.0254.76
4.3.110.0010.0194.67
4.3.100.0010.0204.66
4.3.90.0030.0154.64
4.3.80.0040.0234.59
4.3.70.0010.0174.63
4.3.60.0020.0184.63
4.3.50.0060.0164.63
4.3.40.0040.0254.54
4.3.30.0000.0173.28
4.3.20.0010.0183.26
4.3.10.0020.0203.22
4.3.00.0130.0079.61

preferences:
52.4 ms | 401 KiB | 5 Q