3v4l.org

run code in 300+ PHP versions simultaneously
<?php $superheroes = array( "spider-man" => array( "name" => "Peter Parker", "email" => "peterparker@mail.com", ), "super-man" => array( "name" => "Clark Kent", "email" => "clarkkent@mail.com", ), "iron-man" => array( "name" => "Harry Potter", "email" => "harrypotter@mail.com", ) ); //print_r($superheroes); function checkArray($array, $dimensionName) { $dimensionName = $dimensionName . "_" . $array; forEach($array as $index => $item) { //$dimensionPath = $array . $index; if(is_Array($item)) { echo "========== \n"; //$dimensionPath = $array . $index; echo "YES1-" . $dimensionName . ": " . $item . "\n"; checkArray($item, $dimensionName); } else { echo "NO2-" . $dimensionName . ": " . $item . "\n"; } } } checkArray($superheroes);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: Too few arguments to function checkArray(), 1 passed in /in/sfhH0 on line 35 and exactly 2 expected in /in/sfhH0:19 Stack trace: #0 /in/sfhH0(35): checkArray(Array) #1 {main} thrown in /in/sfhH0 on line 19
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:
44.99 ms | 401 KiB | 8 Q