3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function pram_alter($array, $key) { public $params; $params="$$key = '$array';\n"; } array_walk($fruits, 'pram_alter'); echo $params; ?>

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)
5.4.320.0070.05112.52
5.4.310.0250.10812.52
5.4.300.0150.04612.52
5.4.290.0100.05312.51
5.4.280.0060.04212.41
5.4.270.0050.04012.41
5.4.260.0190.04512.41
5.4.250.0120.04812.41
5.4.240.0060.04012.41
5.4.230.0050.04012.40
5.4.220.0080.05212.40
5.4.210.0060.05012.40
5.4.200.0120.04712.40
5.4.190.0080.04912.39
5.4.180.0080.05312.39
5.4.170.0060.05312.40
5.4.160.0080.03712.40
5.4.150.0060.03812.40
5.4.140.0070.03612.09
5.4.130.0050.04312.07
5.4.120.0090.04212.04
5.4.110.0080.03312.03
5.4.100.0090.04712.03
5.4.90.0090.05112.03
5.4.80.0080.05012.03
5.4.70.0090.05112.03
5.4.60.0090.04812.02
5.4.50.0090.04912.02
5.4.40.0170.04612.02
5.4.30.0080.03812.01
5.4.20.0060.03612.01
5.4.10.0100.03812.01
5.4.00.0130.04211.51
5.3.290.0040.04912.80
5.3.280.0130.03412.71
5.3.270.0060.04212.73
5.3.260.0050.04212.72
5.3.250.0090.03512.72
5.3.240.0090.03812.72
5.3.230.0060.04112.70
5.3.220.0060.04112.68
5.3.210.0050.04612.68
5.3.200.0100.03412.68
5.3.190.0070.03812.68
5.3.180.0080.03512.67
5.3.170.0070.03612.66
5.3.160.0100.03312.67
5.3.150.0040.04012.67
5.3.140.0050.04512.66
5.3.130.0040.04212.66
5.3.120.0050.04112.66
5.3.110.0080.04912.66
5.3.100.0060.04012.13
5.3.90.0070.03812.10
5.3.80.0040.03912.10
5.3.70.0090.04812.10
5.3.60.0110.04212.09
5.3.50.0060.03912.02
5.3.40.0080.03812.03
5.3.30.0130.05111.98
5.3.20.0110.04511.77
5.3.10.0100.04311.73
5.3.00.0060.04011.72
5.2.170.0090.0339.21
5.2.160.0070.0279.21
5.2.150.0060.0329.21
5.2.140.0060.0309.21
5.2.130.0060.0299.18
5.2.120.0080.0309.18
5.2.110.0180.0309.18
5.2.100.0090.0409.18
5.2.90.0040.0369.17
5.2.80.0080.0289.17
5.2.70.0070.0299.17
5.2.60.0060.0309.14
5.2.50.0060.0309.10
5.2.40.0060.0319.08
5.2.30.0040.0309.05
5.2.20.0060.0299.04
5.2.10.0060.0278.95
5.2.00.0040.0338.80
5.1.60.0080.0258.09
5.1.50.0060.0248.09
5.1.40.0050.0248.07
5.1.30.0050.0268.42
5.1.20.0060.0348.44
5.1.10.0050.0268.16
5.1.00.0050.0318.17
5.0.50.0030.0246.64
5.0.40.0040.0196.51
5.0.30.0030.0336.31
5.0.20.0060.0176.28
5.0.10.0060.0276.27
5.0.00.0050.0356.26
4.4.90.0040.0184.78
4.4.80.0030.0224.76
4.4.70.0040.0194.75
4.4.60.0040.0154.75
4.4.50.0050.0174.77
4.4.40.0050.0324.71
4.4.30.0030.0184.76
4.4.20.0050.0194.84
4.4.10.0040.0224.85
4.4.00.0010.0284.76
4.3.110.0020.0164.66
4.3.100.0020.0154.66
4.3.90.0030.0144.63
4.3.80.0020.0254.58
4.3.70.0000.0174.63
4.3.60.0040.0174.62
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0030.0153.30
4.3.20.0020.0163.28
4.3.10.0010.0163.24
4.3.00.0230.01714.28

preferences:
141.32 ms | 1394 KiB | 7 Q