3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = "Football / Germany / 1.Liga Football / Germany / 1.Liga Football / Germany / 2.Liga Football / Germany / 2.Liga Football / Germany / 2.Liga Football / England / 1.Liga Football / England / 1.Liga Football / England / 2.Liga Football / England / 2.Liga Football / England / 3.Liga Hockey / Germany / 1.Liga Hockey / Germany / 1.Liga Hockey / Germany / 2.Liga Fechten / Meisterschaft Fechten / Meisterschaft Fechten / Weltmeister"; $lines = explode("\n", $strings); $array = array(); foreach($lines as $line) { $values = explode(' / ', $line); $depth = 0; foreach($values as $value) { if(!in_array($array[$depth]) $array[$depth][] = $value; $depth++; } } var_dump($array);

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.50.0130.06016.42
5.4.40.0000.07716.36
5.4.30.0100.05316.27
5.4.20.0030.03716.27
5.4.10.0100.03016.39
5.4.00.0030.06715.94
5.3.150.0000.05714.55
5.3.140.0100.07014.46
5.3.130.0070.03714.50
5.3.120.0000.04014.64
5.3.110.0070.03714.49
5.3.100.0070.03313.99
5.3.90.0030.03713.82
5.3.80.0070.04013.96
5.3.70.0070.03713.95
5.3.60.0170.05013.98
5.3.50.0070.07313.89
5.3.40.0070.03314.04
5.3.30.0030.03713.86
5.3.20.0030.06313.63
5.3.10.0130.05013.59
5.3.00.0030.04713.57

preferences:
139.94 ms | 1394 KiB | 7 Q