3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello world Line break occurred! smartcrop>>> This is the third line. Literal --> \\n <-- here "; $translator1 = ['smartcrop>>>' => '', '\n' => '']; $translator2 = ['smartcrop>>>' => '', "\n" => '']; echo $string; echo PHP_EOL; echo strtr($string, $translator1); echo PHP_EOL; echo strtr($string, $translator2); echo PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Hello world Line break occurred! smartcrop>>> This is the third line. Literal --> \n <-- here Hello world Line break occurred! This is the third line. Literal --> <-- here Hello worldLine break occurred! This is the third line.Literal --> \n <-- here

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:
57.69 ms | 402 KiB | 8 Q