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) { $item = (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.00.0060.01314.58
7.3.120.0060.00914.95
7.3.110.0100.00714.72
7.3.100.0060.00914.82
7.3.90.0040.00714.75
7.3.80.0040.00814.92
7.3.70.0080.00614.92
7.3.60.0060.00314.95
7.3.50.0120.00014.58
7.3.40.0080.00414.95
7.3.30.0140.00314.77
7.3.20.0000.01316.61
7.3.10.0040.00716.67
7.3.00.0070.00716.64
7.2.250.0100.00715.06
7.2.240.0100.01015.20
7.2.230.0070.01115.11
7.2.220.0040.01415.03
7.2.210.0070.00715.02
7.2.200.0070.00715.11
7.2.190.0090.00615.07
7.2.180.0040.01115.08
7.2.170.0030.00615.00
7.2.00.0040.00819.45
7.1.330.0110.00415.80
7.1.320.0000.01415.75
7.1.310.0030.01015.90
7.1.300.0100.00315.51
7.1.290.0070.00715.55
7.1.280.0030.00915.79
7.1.270.0000.01215.76
7.1.260.0030.00615.96
7.1.70.0040.00417.26
7.1.60.0140.01119.32
7.1.50.0000.01616.97
7.1.00.0100.06722.31
7.0.200.0060.00316.65
7.0.140.0130.06722.13
7.0.100.0100.06320.00
7.0.90.0100.08319.93
7.0.80.0100.08019.98
7.0.70.0070.08319.94
7.0.60.0100.08019.97
7.0.50.0430.08720.36
7.0.40.0200.07720.19
7.0.30.0070.07720.06
7.0.20.0070.08320.15
7.0.10.0030.05020.12
7.0.00.0130.04720.08
5.6.280.0030.07321.04
5.6.250.0100.08020.54
5.6.240.0070.08720.64
5.6.230.0030.09020.68
5.6.220.0100.07720.68
5.6.210.0000.08020.63
5.6.200.0100.04721.18
5.6.190.0070.04721.02
5.6.180.0070.05721.09
5.6.170.0130.07720.97
5.6.160.0130.04021.06
5.6.150.0000.09021.02
5.6.140.0170.06721.11
5.6.130.0100.07721.06
5.6.120.0070.07321.07
5.6.110.0070.08721.13
5.6.100.0100.08321.07
5.6.90.0170.07721.03
5.6.80.0070.08020.53
5.6.70.0130.04720.35
5.6.60.0100.07720.34
5.6.50.0030.08720.46
5.6.40.0070.08320.41
5.6.30.0030.05320.38
5.6.20.0030.07720.42
5.6.10.0030.08020.42
5.6.00.0030.08020.28
5.5.380.0070.08320.55
5.5.370.0130.07720.41
5.5.360.0030.08020.39
5.5.350.0070.07720.43
5.5.340.0070.06020.92
5.5.330.0000.08020.93
5.5.320.0230.06720.84
5.5.310.0100.07020.86
5.5.300.0070.06020.93
5.5.290.0100.08020.91
5.5.280.0100.07720.74
5.5.270.0070.08020.76
5.5.260.0100.08020.82
5.5.250.0170.06720.55
5.5.240.0030.05320.25
5.5.230.0030.08320.18
5.5.220.0030.08020.16
5.5.210.0000.06020.11
5.5.200.0030.07720.28
5.5.190.0000.04320.23
5.5.180.0030.08320.21
5.5.160.0030.04320.25
5.5.150.0100.08020.26
5.5.140.0100.04019.99
5.5.130.0100.06320.23
5.5.120.0030.08020.19
5.5.110.0100.07720.21
5.5.100.0070.07720.16
5.5.90.0100.04320.11
5.5.80.0030.08020.09
5.5.70.0200.06720.06
5.5.60.0000.08020.04
5.5.50.0070.07720.14
5.5.40.0130.07320.05
5.5.30.0030.08020.15
5.5.20.0100.07320.15
5.5.10.0130.06720.04
5.5.00.0130.07720.04
5.4.450.0030.08319.28
5.4.440.0030.06719.45
5.4.430.0070.07719.39
5.4.420.0170.06719.42
5.4.410.0030.04719.34
5.4.400.0100.06719.17
5.4.390.0170.07018.88
5.4.380.0170.05319.18
5.4.370.0030.07718.95
5.4.360.0100.07719.04
5.4.350.0100.08019.13
5.4.340.0130.07019.05
5.4.320.0070.07718.95
5.4.310.0070.06018.88
5.4.300.0100.07019.16
5.4.290.0100.08019.16
5.4.280.0100.07719.12
5.4.270.0070.07319.02
5.4.260.0030.07019.03
5.4.250.0030.08018.86
5.4.240.0130.06718.87
5.4.230.0030.07719.03
5.4.220.0130.05719.20
5.4.210.0100.07719.02
5.4.200.0000.05318.89
5.4.190.0170.06318.84
5.4.180.0100.07019.03
5.4.170.0070.07718.89
5.4.160.0130.07018.86
5.4.150.0170.07018.99
5.4.140.0070.07716.43
5.4.130.0070.07316.45
5.4.120.0070.06316.24
5.4.110.0000.08016.35
5.4.100.0070.07016.35
5.4.90.0000.07716.47
5.4.80.0030.07716.26
5.4.70.0070.07316.42
5.4.60.0070.08016.30
5.4.50.0030.07316.49
5.4.40.0070.07016.46
5.4.30.0030.04316.48
5.4.20.0070.07316.40
5.4.10.0170.06316.48
5.4.00.0100.06015.85
5.3.290.0170.04014.73
5.3.280.0070.07714.70
5.3.270.0030.07714.56
5.3.260.0100.07014.73
5.3.250.0100.07014.70
5.3.240.0100.07314.63
5.3.230.0070.07714.73
5.3.220.0000.08314.60
5.3.210.0100.07014.70
5.3.200.0070.04314.54
5.3.190.0000.08314.46
5.3.180.0070.05314.61
5.3.170.0070.07014.70
5.3.160.0030.07714.54
5.3.150.0030.07714.58
5.3.140.0000.07714.51
5.3.130.0070.04314.61
5.3.120.0070.07314.48
5.3.110.0130.06714.47
5.3.100.0130.06714.05
5.3.90.0100.03014.05
5.3.80.0030.07314.03
5.3.70.0130.06314.05
5.3.60.0070.07713.99
5.3.50.0070.07314.06
5.3.40.0070.06314.04
5.3.30.0070.06713.82
5.3.20.0030.07313.71
5.3.10.0070.06713.76
5.3.00.0130.06313.55
5.2.170.0030.04011.13
5.2.160.0030.04711.18
5.2.150.0000.06711.13
5.2.140.0030.05711.13
5.2.130.0030.06711.21
5.2.120.0130.04311.20
5.2.110.0070.06011.21
5.2.100.0100.05711.00
5.2.90.0030.06711.19
5.2.80.0070.06011.15
5.2.70.0100.05711.03
5.2.60.0030.06311.14
5.2.50.0030.06311.14
5.2.40.0030.06010.93
5.2.30.0070.06311.01
5.2.20.0100.05310.99
5.2.10.0030.06010.79
5.2.00.0100.05710.57
5.1.60.0030.05710.38
5.1.50.0070.05310.38
5.1.40.0000.05710.38
5.1.30.0030.04310.38
5.1.20.0000.05710.48
5.1.10.0030.03010.38
5.1.00.0030.05010.38
5.0.50.0030.04710.38
5.0.40.0030.04310.38
5.0.30.0030.06010.38
5.0.20.0000.04710.38
5.0.10.0000.04710.38
5.0.00.0070.06310.38
4.4.90.0030.03310.38
4.4.80.0030.03010.38
4.4.70.0070.03010.38
4.4.60.0000.03710.38
4.4.50.0000.04010.38
4.4.40.0000.06010.38
4.4.30.0030.03310.38
4.4.20.0030.03310.38
4.4.10.0000.03310.38
4.4.00.0000.05710.38
4.3.110.0000.03010.38
4.3.100.0070.03310.38
4.3.90.0070.03010.38
4.3.80.0130.04310.38
4.3.70.0070.03010.38
4.3.60.0000.03710.38
4.3.50.0000.02310.38
4.3.40.0000.05310.38
4.3.30.0000.02710.38
4.3.20.0000.03310.38
4.3.10.0000.03010.38
4.3.00.0000.03310.38

preferences:
36.41 ms | 400 KiB | 5 Q