3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function test_alter(&$item1, $key, $prefix) { $item1 = "$prefix: $item1"; } function test_print($item2, $key) { echo "$key. $item2<br />\n"; } echo "Before ...:\n"; array_walk($fruits, 'test_print'); // array_walk($fruits, 'test_alter', 'fruit'); echo "... and after:\n"; array_walk($fruits,function(&$value, &$key){$key = $value; $value=false;}); var_dump($fruits);

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.0090.00916.50
8.3.50.0110.00416.37
8.3.40.0120.00618.78
8.3.30.0120.00318.79
8.3.20.0130.00321.77
8.3.10.0080.00023.71
8.3.00.0030.00519.43
8.2.180.0060.01218.16
8.2.170.0120.00422.96
8.2.160.0040.01120.28
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0040.00420.46
8.2.120.0000.00726.35
8.2.110.0030.00720.35
8.2.100.0070.00417.60
8.2.90.0030.00519.11
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0080.00018.04
8.2.50.0040.00418.10
8.2.40.0040.00420.60
8.2.30.0000.00820.94
8.2.20.0020.00518.05
8.2.10.0070.00018.23
8.2.00.0070.00017.99
8.1.280.0080.00825.92
8.1.270.0080.00020.77
8.1.260.0070.00326.35
8.1.250.0050.00228.09
8.1.240.0030.00622.12
8.1.230.0070.00718.90
8.1.220.0050.00317.91
8.1.210.0060.00318.77
8.1.200.0040.00417.36
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0000.00918.50
8.1.160.0000.00719.01
8.1.150.0030.00518.88
8.1.140.0030.00519.57
8.1.130.0050.00320.55
8.1.120.0040.00417.43
8.1.110.0000.00817.48
8.1.100.0040.00417.36
8.1.90.0040.00417.30
8.1.80.0070.00017.50
8.1.70.0070.00017.46
8.1.60.0000.00817.58
8.1.50.0080.00017.40
8.1.40.0000.00917.54
8.1.30.0000.00817.58
8.1.20.0000.00717.66
8.1.10.0000.00717.52
8.1.00.0080.00317.29
8.0.300.0000.00720.04
8.0.290.0050.00216.88
8.0.280.0000.00818.42
8.0.270.0030.00317.18
8.0.260.0000.00818.89
8.0.250.0060.00317.03
8.0.240.0040.00416.96
8.0.230.0040.00416.92
8.0.220.0030.00316.97
8.0.210.0070.00016.94
8.0.200.0030.00316.95
8.0.190.0040.00416.96
8.0.180.0000.00816.97
8.0.170.0070.00016.98
8.0.160.0000.01117.01
8.0.150.0040.00416.86
8.0.140.0000.00916.94
8.0.130.0050.00013.38
8.0.120.0000.00717.00
8.0.110.0040.00416.75
8.0.100.0000.00716.89
8.0.90.0000.00716.83
8.0.80.0110.00416.91
8.0.70.0000.00716.91
8.0.60.0040.00416.94
8.0.50.0040.00416.82
8.0.30.0090.00917.15
8.0.20.0120.00917.40
8.0.10.0050.00316.97
8.0.00.0050.01216.79
7.4.330.0050.00015.55
7.4.320.0000.00616.56
7.4.300.0000.00616.55
7.4.290.0030.00516.52
7.4.280.0070.00016.53
7.4.270.0070.00016.52
7.4.260.0040.00416.63
7.4.250.0050.00216.58
7.4.240.0070.00016.59
7.4.230.0030.00316.60
7.4.220.0060.01616.47
7.4.210.0030.01316.67
7.4.200.0000.00716.61
7.4.160.0100.00616.62
7.4.150.0110.00517.40
7.4.140.0070.01117.86
7.4.130.0110.01116.57
7.4.120.0090.01316.42
7.4.110.0110.00716.55
7.4.100.0080.00916.44
7.4.90.0040.01416.38
7.4.80.0130.00919.39
7.4.70.0060.01216.47
7.4.60.0090.00616.46
7.4.50.0090.00916.41
7.4.40.0130.00616.46
7.4.30.0100.00716.55
7.4.00.0110.00714.73
7.3.330.0000.00513.39
7.3.320.0060.00013.13
7.3.310.0030.00316.22
7.3.300.0030.00316.29
7.3.290.0070.01116.34
7.3.280.0110.01016.34
7.3.270.0180.00317.40
7.3.260.0180.00616.54
7.3.250.0080.01016.49
7.3.240.0080.00916.30
7.3.230.0090.01216.64
7.3.210.0100.00716.56
7.3.200.0130.01016.41
7.3.190.0120.00616.44
7.3.180.0090.00816.46
7.3.170.0070.01016.45
7.3.160.0130.00916.37
7.2.330.0110.00716.65
7.2.320.0080.00816.34
7.2.310.0130.00316.73
7.2.300.0090.00916.65
7.2.290.0040.01216.55
7.2.60.0030.00916.99
7.2.50.0150.00016.79
7.1.200.0000.01415.74
7.1.70.0120.00616.95
7.1.60.0200.01034.83
7.1.50.0200.01734.72
7.1.40.0100.02334.36
7.1.30.0170.01334.52
7.1.20.0270.00734.61
7.1.10.0030.01316.64
7.1.00.0070.00716.76
7.0.200.0000.01316.89
7.0.190.0000.01316.55
7.0.180.0000.01316.13
7.0.170.0030.01016.33
7.0.160.0030.01316.27
7.0.150.0030.01316.16
7.0.140.0070.00716.20
7.0.130.0100.00316.46
7.0.120.0000.01316.43
7.0.110.0070.00716.20
7.0.100.0070.01016.07
7.0.90.0000.01316.39
7.0.80.0070.00716.32
7.0.70.0000.01316.29
7.0.60.0030.01316.16
7.0.50.0030.01716.58
7.0.40.0000.01716.61
7.0.30.0070.01016.66
7.0.20.1300.01016.46
7.0.10.0070.00716.68
7.0.00.0100.00316.36

preferences:
52.43 ms | 400 KiB | 5 Q