3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = " Hello World\tFoo\t\tBar but single space is fine 8 are not, 4 are not,\ttabs are not,\t\tdouble tabs are not"; $orig = str_replace(' ', '', $txt); $t1 = preg_replace('/\t| {4}/', '', $txt); var_dump($txt); var_dump($orig); echo '-----------------' . PHP_EOL; var_dump($t1);
Output for git.master, git.master_jit, rfc.property-hooks
string(123) " Hello World Foo Bar but single space is fine 8 are not, 4 are not, tabs are not, double tabs are not" string(99) "HelloWorld Foo Bar but single space is fine8 are not,4 are not, tabs are not, double tabs are not" ----------------- string(93) "HelloWorldFooBar but single space is fine8 are not,4 are not,tabs are not,double tabs are not"

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:
130.55 ms | 406 KiB | 5 Q