3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a' => 12, 'b' => 'foo', 'caution' => array('blubb' => array('bar' => 'baz'))); function foo($item, $key) { return (object)$item; } $start = microtime(true); $obj1 = array_walk_recursive($arr, 'foo'); $end = microtime(true) - $start; echo "Run: " . $end . PHP_EOL; var_dump($arr);

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)
7.4.10.0060.01315.00
7.4.00.0060.01114.89
7.3.130.0110.00714.68
7.3.120.0030.01414.93
7.3.110.0090.00714.67
7.3.100.0090.00614.71
7.3.90.0070.00714.78
7.3.80.0030.00914.76
7.3.70.0050.01014.90
7.3.60.0040.00914.60
7.3.50.0010.01214.72
7.3.40.0060.00614.63
7.3.30.0060.00814.71
7.3.20.0040.01016.71
7.3.10.0050.00816.62
7.3.00.0100.00416.58
7.2.260.0100.00714.60
7.2.250.0060.01114.98
7.2.240.0080.01014.93
7.2.230.0030.01115.08
7.2.220.0080.00514.96
7.2.210.0080.00814.97
7.2.200.0060.00614.98
7.2.190.0050.00815.07
7.2.180.0030.01214.92
7.2.170.0030.01014.98
7.2.160.0090.00615.14
7.2.150.0080.00816.94
7.2.140.0000.01716.91
7.2.130.0040.01117.09
7.2.120.0030.00716.82
7.2.110.0030.01017.00
7.2.100.0030.01016.66
7.2.90.0000.00917.08
7.2.80.0030.00717.05
7.2.70.0070.00717.09
7.2.60.0150.00016.88
7.2.50.0060.00916.98
7.2.40.0070.00716.77
7.2.30.0070.00317.06
7.2.20.0110.00416.82
7.2.10.0100.00317.02
7.2.00.0050.01118.12
7.1.330.0080.00515.70
7.1.320.0070.00915.80
7.1.310.0000.01415.71
7.1.300.0040.01115.74
7.1.290.0040.00615.63
7.1.280.0060.00815.72
7.1.270.0100.00315.58
7.1.260.0020.00915.76
7.1.250.0070.00715.95
7.1.240.0000.00915.73
7.1.230.0060.00615.50
7.1.220.0040.01415.56
7.1.210.0030.00915.82
7.1.200.0100.00315.55
7.1.190.0000.00915.69
7.1.180.0030.01415.90
7.1.170.0060.00915.62
7.1.160.0050.00515.73
7.1.150.0070.00715.66
7.1.140.0030.01015.64
7.1.130.0060.00615.77
7.1.120.0000.01315.57
7.1.110.0080.00415.93
7.1.100.0030.01415.83
7.1.90.0000.01515.80
7.1.80.0000.01415.73
7.1.70.0030.01016.33
7.1.60.0050.01317.49
7.1.50.0060.01216.29
7.1.40.0120.00315.68
7.1.30.0100.00015.43
7.1.20.0050.00515.64
7.1.10.0080.00815.43
7.1.00.0010.02318.92
7.0.330.0080.00615.62
7.0.320.0070.00715.41
7.0.310.0060.00615.52
7.0.300.0030.00715.36
7.0.290.0040.00415.15
7.0.280.0060.00615.29
7.0.270.0050.00315.31
7.0.260.0130.00015.34
7.0.250.0030.01315.64
7.0.240.0000.01415.46
7.0.230.0070.00715.23
7.0.220.0030.01315.23
7.0.210.0150.00015.40
7.0.200.0040.00715.87
7.0.190.0060.00915.37
7.0.180.0070.00315.44
7.0.170.0050.00515.36
7.0.160.0000.00915.60
7.0.150.0110.00415.37
7.0.140.0030.04218.55
7.0.130.0000.00915.54
7.0.120.0040.01515.32
7.0.110.0070.00715.25
7.0.100.0040.04417.66
7.0.90.0080.04317.73
7.0.80.0180.03017.68
7.0.70.0120.04317.71
7.0.60.0130.02717.63
7.0.50.0070.04017.88
7.0.40.0070.04016.94
7.0.30.0030.04816.88
7.0.20.0070.03416.74
7.0.10.0050.03516.66
7.0.00.0070.02216.84
5.6.400.0080.00014.34
5.6.390.0000.01014.59
5.6.380.0030.00614.36
5.6.370.0030.01214.32
5.6.360.0100.00314.20
5.6.350.0070.00714.79
5.6.340.0030.00614.27
5.6.330.0060.00914.52
5.6.320.0000.01414.54
5.6.310.0070.00714.48
5.6.300.0000.00914.41
5.6.290.0090.00314.48
5.6.280.0050.04017.78
5.6.270.0070.01014.50
5.6.260.0070.01114.26
5.6.250.0050.02917.61
5.6.240.0060.02517.36
5.6.230.0040.04117.66
5.6.220.0110.02017.42
5.6.210.0090.03717.40
5.6.200.0040.03717.76
5.6.190.0030.04517.57
5.6.180.0020.02817.65
5.6.170.0030.04317.57
5.6.160.0120.02717.65
5.6.150.0100.01817.78
5.6.140.0070.04517.77
5.6.130.0090.02717.70
5.6.120.0080.03817.78
5.6.110.0060.02617.71
5.6.100.0040.02617.79
5.6.90.0070.03517.66
5.6.80.0070.03017.26
5.6.70.0050.02317.40
5.6.60.0050.03817.50
5.6.50.0090.04317.21
5.6.40.0070.04517.47
5.6.30.0030.02417.27
5.6.20.0030.04317.43
5.6.10.0050.02017.28
5.6.00.0120.02417.38
5.5.380.0070.03417.40
5.5.370.0070.02517.34
5.5.360.0100.04017.23
5.5.350.0080.04017.13
5.5.340.0080.03717.63
5.5.330.0070.02517.47
5.5.320.0050.02217.52
5.5.310.0050.04417.49
5.5.300.0030.02417.45
5.5.290.0090.01917.42
5.5.280.0030.02517.45
5.5.270.0030.02817.61
5.5.260.0070.02317.68
5.5.250.0100.01717.60
5.5.240.0060.02017.12
5.5.230.0080.02817.11
5.5.220.0140.03617.17
5.5.210.0070.02717.22
5.5.200.0080.04317.25
5.5.190.0030.02517.11
5.5.180.0110.04217.31
5.5.170.0000.01113.98
5.5.160.0100.01617.16
5.5.150.0000.02816.95
5.5.140.0050.04217.28
5.5.130.0020.03817.06
5.5.120.0040.02417.03
5.5.110.0050.03817.21
5.5.100.0070.03217.24
5.5.90.0080.03517.07
5.5.80.0080.03717.23
5.5.70.0060.03617.09
5.5.60.0070.03717.12
5.5.50.0050.04017.19
5.5.40.0050.02517.14
5.5.30.0050.03117.12
5.5.20.0070.03016.97
5.5.10.0020.03917.09
5.5.00.0040.02117.01
5.4.450.0030.03015.37
5.4.440.0030.02215.34
5.4.430.0050.02215.22
5.4.420.0060.03015.32
5.4.410.0020.02515.13
5.4.400.0110.01715.03
5.4.390.0050.03915.03
5.4.380.0090.01815.06
5.4.370.0070.02814.85
5.4.360.0050.03015.01
5.4.350.0020.03315.18
5.4.340.0080.03515.14
5.4.330.0030.00911.09
5.4.320.0070.04015.03
5.4.310.0080.01714.92
5.4.300.0070.03514.94
5.4.290.0070.02915.09
5.4.280.0020.03415.09
5.4.270.0080.03314.98
5.4.260.0030.02014.88
5.4.250.0000.02614.98
5.4.240.0060.02314.91
5.4.230.0050.03515.17
5.4.220.0050.03515.02
5.4.210.0120.03315.03
5.4.200.0090.01515.06
5.4.190.0020.04115.15
5.4.180.0050.02915.11
5.4.170.0070.02514.98
5.4.160.0050.02814.87
5.4.150.0050.03314.98
5.4.140.0060.01513.53
5.4.130.0110.03313.82
5.4.120.0040.02213.63
5.4.110.0050.01813.59
5.4.100.0080.02013.57
5.4.90.0060.02413.77
5.4.80.0060.02313.60
5.4.70.0050.03213.65
5.4.60.0050.02013.66
5.4.50.0030.02413.76
5.4.40.0050.01713.73
5.4.30.0030.03813.76
5.4.20.0050.02013.76
5.4.10.0020.02413.71
5.4.00.0080.03313.53
5.3.290.0050.03412.62
5.3.280.0000.02512.57
5.3.270.0030.04312.62
5.3.260.0050.02612.55
5.3.250.0030.02712.69
5.3.240.0040.04012.50
5.3.230.0080.02012.47
5.3.220.0050.01712.44
5.3.210.0080.03712.53
5.3.200.0020.03012.58
5.3.190.0020.02212.42
5.3.180.0040.01812.62
5.3.170.0020.02312.66
5.3.160.0040.03212.69
5.3.150.0050.03712.69
5.3.140.0100.02712.54
5.3.130.0030.04312.41
5.3.120.0090.02012.52
5.3.110.0020.03012.52
5.3.100.0030.02612.26
5.3.90.0000.04012.38
5.3.80.0070.02312.28
5.3.70.0030.02212.26
5.3.60.0050.02212.25
5.3.50.0080.04012.32
5.3.40.0020.04112.28
5.3.30.0030.04312.21
5.3.20.0080.02012.09
5.3.10.0100.02012.03
5.3.00.0030.02312.04
5.2.170.0030.05011.82
5.2.160.0070.02311.82
5.2.150.0100.05311.82
5.2.140.0000.03711.82
5.2.130.0100.05711.82
5.2.120.0000.03311.82
5.2.110.0000.03011.82
5.2.100.0070.05011.82
5.2.90.0000.03311.82
5.2.80.0000.05711.82
5.2.70.0000.06711.82
5.2.60.0000.03311.82
5.2.50.0070.04011.82
5.2.40.0070.05711.82
5.2.30.0030.03311.82
5.2.20.0000.03311.82
5.2.10.0030.03011.82
5.2.00.0030.06311.82
5.1.60.0030.05311.82
5.1.50.0000.05711.82
5.1.40.0070.05711.82
5.1.30.0030.03011.82
5.1.20.0030.05711.82
5.1.10.0030.03311.82
5.1.00.0070.04311.82
5.0.50.0030.02311.82
5.0.40.0130.03311.82
5.0.30.0030.06011.82
5.0.20.0030.04311.82
5.0.10.0030.03711.47
5.0.00.0030.06711.47
4.4.90.0030.03711.82
4.4.80.0000.02311.82
4.4.70.0000.01711.82
4.4.60.0030.03711.82
4.4.50.0000.01711.82
4.4.40.0100.04311.82
4.4.30.0000.04311.82
4.4.20.0070.03311.82
4.4.10.0000.02311.82
4.4.00.0030.05011.82
4.3.110.0070.02711.82
4.3.100.0030.03311.82
4.3.90.0030.03311.47
4.3.80.0030.03011.47
4.3.70.0100.02711.47
4.3.60.0030.03711.47
4.3.50.0000.03011.47
4.3.40.0000.03011.47
4.3.30.0000.03311.47
4.3.20.0000.03711.47
4.3.10.0070.02311.47
4.3.00.0070.02711.47

preferences:
40.95 ms | 401 KiB | 5 Q