3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* hey, i'm trying to get: Array[1] = Array ( [A1] => 123 [B1] => 1234 [C2] => Array ( [0] => 123 [1] => 456 [2] => 789 ) [R2] => Array ( [0] => 1 [1] => 4 [2] => 4 [3] => 6 ) ) */ $c = array('1'=>array("A1"=>123,"B1"=>1234,"C2"=>array(123,456,789))); $d = array('1'=>array("R2"=>array(1,4,4,6))); echo "<h1>now what</h1>"; $y = array_merge($d,$c); print_r($y);

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0030.01316.63
7.2.00.0080.00819.28
7.1.200.0090.00915.52
7.1.100.0090.00617.86
7.1.70.0040.00717.16
7.1.60.0030.01419.32
7.1.50.0070.01416.85
7.1.00.0000.07722.45
7.0.200.0060.00316.49
7.0.140.0000.07722.09
7.0.100.0200.03719.91
7.0.90.0030.03719.90
7.0.80.0300.05019.92
7.0.70.0000.03719.93
7.0.60.0030.06019.97
7.0.50.0030.06320.26
7.0.40.0070.05020.11
7.0.30.0200.05320.03
7.0.20.0100.07720.08
7.0.10.0030.08720.14
7.0.00.0100.04720.08
5.6.280.0070.07021.14
5.6.250.0070.03720.49
5.6.240.0070.04320.63
5.6.230.0030.05320.50
5.6.220.0000.04320.53
5.6.210.0000.04720.55
5.6.200.0070.07021.00
5.6.190.0070.04721.07
5.6.180.0130.07721.03
5.6.170.0070.08020.96
5.6.160.0070.09021.01
5.6.150.0130.07321.13
5.6.140.0070.06021.02
5.6.130.0000.05321.04
5.6.120.0100.07021.05
5.6.110.0070.08320.92
5.6.100.0100.08021.03
5.6.90.0100.08020.99
5.6.80.0070.05320.40
5.6.70.0030.08720.39
5.6.60.0070.08320.46
5.6.50.0100.07720.42
5.6.40.0230.05720.41
5.6.30.0030.04720.44
5.6.20.0100.06320.41
5.6.10.0100.08320.45
5.6.00.0070.06720.34
5.5.380.0100.03320.35
5.5.370.0030.04020.45
5.5.360.0070.04020.40
5.5.350.0070.03720.48
5.5.340.0030.08720.93
5.5.330.0100.07320.89
5.5.320.0070.07320.85
5.5.310.0070.07720.91
5.5.300.0070.08720.79
5.5.290.0030.07320.91
5.5.280.0100.08320.64
5.5.270.0070.09020.76
5.5.260.0200.05320.63
5.5.250.0100.08020.73
5.5.240.0170.04320.21
5.5.230.0070.07020.23
5.5.220.0030.08319.98
5.5.210.0070.07720.20
5.5.200.0070.08320.12
5.5.190.0100.07020.29
5.5.180.0100.06720.25
5.5.160.0100.07720.27
5.5.150.0030.04720.19
5.5.140.0070.06020.23
5.5.130.0100.07019.95
5.5.120.0000.05320.11
5.5.110.0070.05020.16
5.5.100.0030.04719.96
5.5.90.0000.04720.11
5.5.80.0130.03320.03
5.5.70.0170.05320.06
5.5.60.0000.07320.05
5.5.50.0070.05719.95
5.5.40.0000.06320.04
5.5.30.0030.07320.11
5.5.20.0000.08020.04
5.5.10.0070.07320.01
5.5.00.0070.06720.02
5.4.450.0030.07719.36
5.4.440.0100.08019.51
5.4.430.0100.08019.32
5.4.420.0100.05019.55
5.4.410.0070.07319.07
5.4.400.0030.08019.13
5.4.390.0100.06318.94
5.4.380.0170.07319.23
5.4.370.0130.05318.85
5.4.360.0030.08019.13
5.4.350.0230.05719.16
5.4.340.0130.08019.14
5.4.320.0100.03719.12
5.4.310.0030.04319.09
5.4.300.0000.04019.02
5.4.290.0200.02319.12
5.4.280.0070.07719.20
5.4.270.0070.07319.05
5.4.260.0070.06019.04
5.4.250.0130.07319.02
5.4.240.0100.06718.88
5.4.230.0070.04719.22
5.4.220.0070.07718.84
5.4.210.0070.07319.09
5.4.200.0070.08318.93
5.4.190.0100.07019.02
5.4.180.0070.07718.83
5.4.170.0100.07318.89
5.4.160.0070.07719.12
5.4.150.0030.08019.01
5.4.140.0000.07716.41
5.4.130.0070.05316.40
5.4.120.0070.07716.40
5.4.110.0030.07316.27
5.4.100.0030.04016.43
5.4.90.0100.03316.47
5.4.80.0030.03716.53
5.4.70.0030.06316.33
5.4.60.0100.06016.48
5.4.50.0070.06316.46
5.4.40.0070.06716.54
5.4.30.0100.04016.35
5.4.20.0000.04716.39
5.4.10.0070.04316.33
5.4.00.0070.07315.91
5.3.290.0030.07314.79
5.3.280.0000.04714.69
5.3.270.0070.07714.52
5.3.260.0030.04714.69
5.3.250.0070.07014.66
5.3.240.0130.06314.71
5.3.230.0130.07714.54
5.3.220.0070.06014.59
5.3.210.0100.07314.70
5.3.200.0200.05714.52
5.3.190.0070.06714.54
5.3.180.0070.06014.62
5.3.170.0030.08314.58
5.3.160.0070.07014.54
5.3.150.0030.05314.63
5.3.140.0070.06714.55
5.3.130.0100.07314.61
5.3.120.0100.07314.53
5.3.110.0030.08014.65
5.3.100.0130.06314.00
5.3.90.0070.08014.03
5.3.80.0100.06314.14
5.3.70.0100.04714.07
5.3.60.0070.04014.11
5.3.50.0100.04714.00
5.3.40.0070.04313.99
5.3.30.0030.06713.96
5.3.20.0170.06713.77
5.3.10.0030.06013.64
5.3.00.0000.07013.72
5.2.170.0000.05711.74
5.2.160.0000.06711.74
5.2.150.0130.05711.74
5.2.140.0100.05711.74
5.2.130.0030.04011.74
5.2.120.0030.06311.74
5.2.110.0030.06311.74
5.2.100.0100.05711.74
5.2.90.0030.03711.74
5.2.80.0100.06311.74
5.2.70.0030.06711.74
5.2.60.0000.06311.74
5.2.50.0130.02711.74
5.2.40.0070.05011.74
5.2.30.0070.03311.74
5.2.20.0100.05711.74
5.2.10.0000.05011.74
5.2.00.0070.06011.74
5.1.60.0130.04311.74
5.1.50.0030.03711.74
5.1.40.0130.02711.74
5.1.30.0030.06011.74
5.1.20.0030.05311.74
5.1.10.0070.05311.74
5.1.00.0070.02311.74
5.0.50.0000.04711.74
5.0.40.0000.04711.74
5.0.30.0070.06311.74
5.0.20.0100.01711.74
5.0.10.0000.04711.74
5.0.00.0070.06011.74
4.4.90.0000.02011.74
4.4.80.0070.03011.74
4.4.70.0030.03711.74
4.4.60.0030.03011.74
4.4.50.0070.03011.74
4.4.40.0030.05011.74
4.4.30.0000.02311.74
4.4.20.0070.02011.74
4.4.10.0030.02711.74
4.4.00.0070.05311.74
4.3.110.0030.01711.74
4.3.100.0030.03711.74
4.3.90.0030.03311.74
4.3.80.0100.04311.74
4.3.70.0000.03311.74
4.3.60.0030.03311.74
4.3.50.0100.02011.74
4.3.40.0030.03011.74
4.3.30.0030.03011.74
4.3.20.0000.03011.74
4.3.10.0000.03311.74
4.3.00.0000.02311.74