3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[]=15; $a[] = '16'; $i= 0; foreach($a as $key=>$value){ $i++; $b['app']='apple'; $b['ora']='orange'; $c = array('iphone','nexus','iphone','micromax'); foreach($c as $ckey=>$cvalue){ if($cvalue=='iphone'){ $b['phone']=$cvalue; } var_dump($b)."<br>"; echo "calling a function<br>"; unset($b['phone']); } } var_dump($a);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" ["phone"]=> string(6) "iphone" } calling a function<br>array(2) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" } calling a function<br>array(3) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" ["phone"]=> string(6) "iphone" } calling a function<br>array(2) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" } calling a function<br>array(3) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" ["phone"]=> string(6) "iphone" } calling a function<br>array(2) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" } calling a function<br>array(3) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" ["phone"]=> string(6) "iphone" } calling a function<br>array(2) { ["app"]=> string(5) "apple" ["ora"]=> string(6) "orange" } calling a function<br>array(2) { [0]=> int(15) [1]=> string(2) "16" }

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:
47.4 ms | 403 KiB | 8 Q