3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nodes = array(); $parents = array() function fillCategory($s, $id, $parentId){ $p = strpos('/', $s); $s1 = substr(0, $p); $s2 = substr($p); if(empty($parentId)){ $parents[$s] = $id; }else{ $parentId = $parents[$s]; } $nodes[] = array($s, $id, $parentId); $id += 1; if(isset($s2)){ fillCategory($s, $id, $parentId); } } fillCategory('Мужчинам / Носки / Белые'); var_dump($nodes);

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)
7.0.00.0070.08720.43
5.6.160.0100.08020.55
5.6.150.0030.08018.13
5.6.140.0070.06718.15
5.6.130.0170.06318.17
5.6.120.0030.05020.98
5.6.110.0030.08021.00
5.6.100.0130.08321.03
5.6.90.0100.08321.13
5.6.80.0070.06320.38
5.5.300.0100.03017.95
5.5.290.0100.07718.01
5.5.280.0030.08720.77
5.5.270.0130.08020.95
5.5.260.0000.05720.79
5.5.250.0000.04320.61
5.5.240.3630.04020.04

preferences:
141.63 ms | 1394 KiB | 7 Q