3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "aa\" b \x27 c"; $sum = 0; $inputs = explode("\n", $input); for($i = 0; $i<count($inputs); $i++){ $ns = addslashes($inputs[$i]); echo preg_match("/\\^[\"]/",$ns); for($j = 0; $j<strlen($ns); $j++){ $sum++; echo $ns[$j]."|"; } if(preg_match("/\\[^\"]/",$ns)>0){ $sum+=2; } //$sum-= strlen($inputs[$i]); } echo $sum;
Output for git.master, git.master_jit, rfc.property-hooks
0a|a|\|"| |b| |\|'| |c|11

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