3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ajaxcart = '{\"119\":[[\"Front Row\",119,5,3,15]]}'; $cart[] = json_decode(stripslashes($ajaxcart)); var_dump($cart); foreach ($cart as $key => $value) { if(property_exists($value, '119')){ echo 'true1'; }else{ echo 'false1'; } } foreach ($cart[0]->{119} as $key => $value) { if(in_array(119, $value)){ echo 'true2'; }else{ echo 'false2'; } }
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> object(stdClass)#1 (1) { ["119"]=> array(1) { [0]=> array(5) { [0]=> string(9) "Front Row" [1]=> int(119) [2]=> int(5) [3]=> int(3) [4]=> int(15) } } } } true1true2

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:
24.76 ms | 406 KiB | 5 Q