3v4l.org

run code in 300+ PHP versions simultaneously
<?php $drinks = array("maza","coffe","coffe","coffe"); $foods = array("coffe","choco","choco","choco","appy","kurkure","maggi"); $temp=0; foreach($drinks as $drink){ //you could use foreach instead of for foreach($foods as $food){ if($drink==$food){ $temp++; } //always use brakets } echo "word count of".$drink.' is '.$temp; echo "<br/>"; } //br looks like this
Output for git.master, git.master_jit, rfc.property-hooks
word count ofmaza is 0<br/>word count ofcoffe is 1<br/>word count ofcoffe is 2<br/>word count ofcoffe is 3<br/>

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