3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is a string\n with newline\n" . "\xC2\xA0" . "and special character\n"; $cleaned_string = preg_replace(['/\R/u', '/\xC2\xA0/u'], ['/n', ''], $string); var_dump($string, $cleaned_string);
Output for git.master_jit, git.master, rfc.property-hooks
string(55) "This is a string with newline  and special character " string(58) "This is a string/n with newline/n and special character/n"

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:
79.9 ms | 405 KiB | 5 Q