3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArr=array( array( 'question' => 'First Question', 'opt' => array('A','B','c','D'), 'ans' => '3' ), array( 'question' => 'Second Question', 'opt' => array('A','B','c','D'), 'ans' => '1' ) ); function display_array($arr){ if(gettype($arr) == 'array'){ foreach($arr as $v){ display_array($v); } }else{ echo $arr . PHP_EOL; // change to BR (I used PHP_EOL just for 3v4l.org) } } display_array($myArr);
Output for git.master, git.master_jit, rfc.property-hooks
First Question A B c D 3 Second Question A B c D 1

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:
114.6 ms | 1640 KiB | 4 Q