3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $students = array ( array("Students Name" =>"Akash", "Roll No." =>01, "Subject" =>"c++","Gender" =>"male"), array("Students Name" =>"Dinesh", "Roll No." =>02, "Subject" =>"c++","Gender" =>"male"), array("Students Name" =>"Satish", "Roll No." =>03, "Subject" =>"c++","Gender" =>"male"), array("Students Name" =>"Alok", "Roll No." =>04, "Subject" =>"c++","Gender" =>"male"), ); echo '<pre>'; //print_r($students); //echo $students[0]["Students Name"]; //echo $students[1]["Roll No."]; foreach($students as $key=>$value) { echo '<p>'.$key.'-'.$value.'</p>'; }
Output for 5.4.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
<pre> Notice: Array to string conversion in /in/pocHc on line 14 <p>0-Array</p> Notice: Array to string conversion in /in/pocHc on line 14 <p>1-Array</p> Notice: Array to string conversion in /in/pocHc on line 14 <p>2-Array</p> Notice: Array to string conversion in /in/pocHc on line 14 <p>3-Array</p>
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.3.29
<pre><p>0-Array</p><p>1-Array</p><p>2-Array</p><p>3-Array</p>