3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $merged = [ 'a' => 'b', 'b' => 'c', 'c' => 'z', 'd' => 'a', 'e' => 'z' ]; $aliasesReduced = false; while(!$aliasesReduced) { $aliasesReduced = true; foreach($merged as $originalId => &$mergedId) { if (array_key_exists($mergedId, $merged)) { $mergedId = $merged[$mergedId]; $aliasesReduced = false; } } } print_r($merged);
based on 6gll2

Here you find the average performance (time & memory) of each version. A greyed 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.3.0alpha10.0100.00012.51
7.2.60.0260.00516.53
7.2.00.0120.00319.32
7.1.100.0050.00517.90
7.1.70.0000.00817.26
7.1.60.0100.01419.50
7.1.50.0040.01516.93
7.1.00.0030.07722.28
7.0.200.0150.00816.46
7.0.140.0030.04022.05
7.0.60.0030.07020.02
7.0.50.0000.08717.79
7.0.40.0030.05720.23
7.0.30.0270.04320.09
7.0.20.0230.06320.21
7.0.10.0300.06320.22
7.0.00.0100.03720.01
5.6.280.0030.07321.07
5.6.210.0100.07320.71
5.6.200.0100.07318.21
5.6.190.0100.06320.67
5.6.180.0130.04720.39
5.6.170.0270.07720.48
5.6.160.0230.06720.38
5.6.150.0100.03318.09
5.6.140.0100.06318.23
5.6.130.0030.06018.12
5.6.120.0030.07021.04
5.6.110.0070.07721.11
5.6.100.0070.08721.07
5.6.90.0100.08321.13
5.6.80.0030.06720.37
5.6.70.0300.07020.39
5.5.350.0270.07320.35
5.5.340.0070.03717.96
5.5.330.0070.08020.40
5.5.320.0070.08020.13
5.5.310.0330.07020.30
5.5.300.0070.08018.00
5.5.290.0130.07717.98
5.5.280.0100.08020.64
5.5.270.0030.04320.82
5.5.260.0070.07020.83
5.5.250.0100.07320.57
5.5.240.0130.07720.26
5.4.450.0730.05019.48
5.4.440.0970.05719.47
5.4.430.0870.06019.58
5.4.420.1000.05719.60
5.4.410.0500.06319.42
5.4.400.0330.05318.77
5.4.390.0170.05718.59
5.4.380.0270.05318.73
5.4.370.0330.06718.46
5.4.360.0370.06018.59
5.4.350.1700.07318.70
5.4.340.0370.05318.65
5.4.320.0200.06018.76
5.4.310.0400.05018.68
5.4.300.0430.04318.67
5.4.290.0300.05718.71
5.4.280.0370.05318.48
5.4.270.0300.07018.52
5.4.260.0300.05718.58
5.4.250.0230.06018.64
5.4.240.0270.06318.71
5.4.230.0230.07318.70
5.4.220.0300.04318.61
5.4.210.1370.05718.48
5.4.200.0330.05016.43
5.4.190.0300.05718.51
5.4.180.0330.05318.47
5.4.170.0270.05718.77
5.4.160.0270.07318.70
5.4.150.0300.05318.69
5.4.140.0300.04716.16
5.4.130.1500.04716.22
5.4.120.0200.05716.14
5.4.110.0200.06016.18
5.4.100.0270.05316.11
5.4.90.0230.07716.13
5.4.80.0400.05316.28
5.4.70.0900.06316.19
5.4.60.0200.06316.19
5.4.50.0330.06316.13
5.4.40.0270.04716.13
5.4.30.0330.05016.31
5.4.20.1530.05016.13
5.4.10.0330.05716.00
5.4.00.0200.05315.72
5.3.290.0130.06714.61
5.3.280.0170.07714.68
5.3.270.0330.06714.64
5.3.260.0370.06014.67
5.3.250.0230.05314.51
5.3.240.0300.06314.70
5.3.230.0230.07014.60
5.3.220.0330.05714.54
5.3.210.0270.07014.66
5.3.200.0300.06314.47
5.3.190.0330.06014.66
5.3.180.0230.06014.50
5.3.170.0330.04314.51
5.3.160.0600.06714.56
5.3.150.0270.06714.52
5.3.140.0170.07714.64
5.3.130.0230.07014.64
5.3.120.0170.07314.44
5.3.110.0230.06314.50
5.3.100.0300.07713.96
5.3.90.0330.07014.00
5.3.80.0400.06013.92
5.3.70.0300.05714.00
5.3.60.0300.04714.00
5.3.50.0270.04713.91
5.3.40.0230.05714.02
5.3.30.0230.05313.82
5.3.20.0270.04713.60
5.3.10.0170.05713.55
5.3.00.0300.04713.63
5.2.170.0330.04311.10
5.2.160.0200.04311.15
5.2.150.0200.04011.13
5.2.140.0100.05311.19
5.2.130.0170.04011.07
5.2.120.0230.04011.07
5.2.110.0230.03011.25
5.2.100.0030.05311.08
5.2.90.0130.04711.16
5.2.80.0100.05011.15
5.2.70.0100.04711.09
5.2.60.0130.04311.21
5.2.50.0200.04011.02
5.2.40.0170.04010.90
5.2.30.0100.04310.92
5.2.20.0170.03710.88
5.2.10.0070.04710.87
5.2.00.0300.03310.74
5.1.60.0130.03310.02
5.1.50.0030.0439.96
5.1.40.0170.03710.03
5.1.30.0170.03310.34
5.1.20.0200.04010.41
5.1.10.0170.03710.08
5.1.00.0100.04010.04
5.0.50.0070.0338.59
5.0.40.0130.0338.47
5.0.30.0030.0538.29
5.0.20.0070.0278.21
5.0.10.0000.0338.28
5.0.00.0070.0478.25
4.4.90.0070.0235.95
4.4.80.0130.0175.88
4.4.70.0100.0205.88
4.4.60.0100.0205.89
4.4.50.0000.0275.81
4.4.40.0070.0405.89
4.4.30.0100.0235.91
4.4.20.0130.0205.95
4.4.10.0100.0205.96
4.4.00.0100.0335.89
4.3.110.0070.0235.80
4.3.100.0030.0235.83
4.3.90.0100.0175.80
4.3.80.0170.0335.80
4.3.70.0100.0175.76
4.3.60.0070.0205.86
4.3.50.0170.0135.76
4.3.40.0070.0375.82
4.3.30.0070.0234.56
4.3.20.0070.0204.65
4.3.10.0070.0204.55
4.3.00.0170.0276.90