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);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function fillCategory(), 1 passed in /in/f2H9N on line 21 and exactly 3 expected in /in/f2H9N:5 Stack trace: #0 /in/f2H9N(21): fillCategory('\xD0\x9C\xD1\x83\xD0\xB6\xD1\x87\xD0\xB8\xD0\xBD\xD0\xB0\xD0...') #1 {main} thrown in /in/f2H9N on line 5
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.15 ms | 401 KiB | 8 Q