3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mystr_replace($needle,$replace,$haystack){ $args = func_get_args(); $count=null; if(isset($args[3])){ $count &= $args[3]; } var_dump($args); if(is_null($count)) { return "3:".str_replace($needle,$replace,$haystack); } else { return "4:".str_replace($needle,$replace,$haystack,$count); } } echo mystr_replace("frop","frml","fropfrop")."\n"; echo mystr_replace("frop","frml","fropfrop",1)."\n";
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> string(4) "frop" [1]=> string(4) "frml" [2]=> string(8) "fropfrop" } 3:frmlfrml array(4) { [0]=> string(4) "frop" [1]=> string(4) "frml" [2]=> string(8) "fropfrop" [3]=> int(1) } 4:frmlfrml

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