3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = array(); $org = ' valid_The Cat-Name%'.PHP_EOL; $r[] = $org; $filter = filter_var($org, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH); $r[] = $filter; $trim = trim($filter); $r[] = $trim; $mv_space = str_replace(' ', '-', $trim); $r[] = $mv_space; $rm_w = str_replace(array("\n", "\r", "\t"), '', $mv_space); $r[] = $rm_w; $lower = strtolower($rm_w); $r[] = $lower; var_dump($r);
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> string(21) " valid_The Cat-Name% " [1]=> string(20) " valid_The Cat-Name%" [2]=> string(19) "valid_The Cat-Name%" [3]=> string(19) "valid_The-Cat-Name%" [4]=> string(19) "valid_The-Cat-Name%" [5]=> string(19) "valid_the-cat-name%" }

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