3v4l.org

run code in 300+ PHP versions simultaneously
<?php $good =['name'=> 'prinsha','surname'=> 'jangam']; $good['doggy'] = 'newjippu'; //echo $good['name']; foreach($good as $key=>$item){ echo $key .' '.$item. "\n"; } $array = [1, 2, 3,4, 5] ; // Mulltidimensional array $dogs = [ ['breed' => 'Cocker Spaniel', 'name' => ' Jypsy', 'size' => [ 'width'=> 5, 'height'=> 10]], ['breed' => 'german ', 'name' => ' Jypsy', 'size' => [ 'width'=>5, 'height'=> 10]], ['breed' => 'Shiba Inu', 'name' => ' Kotetsu', 'size' => [ 'width'=> 5, 'height'=> 10]], ['breed' => 'Unknown', 'name' => ' Sheru Bahadur', 'size' => [ 'width'=>5, 'height'=> 10]], ]; echo $dogs[0]; // we can use this to represent record of any kind, for example student record, anything, even complex things
Output for git.master, git.master_jit, rfc.property-hooks
name prinsha surname jangam doggy newjippu Warning: Array to string conversion in /in/figZ1 on line 26 Array

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:
42.71 ms | 401 KiB | 8 Q