3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ " \ntest1 \n \t \ntest1\n\n " => "test1\ntest1", " \r\ntest2 \r\n \t \r\ntest2\r\n\r\n " => "test2\r\ntest2", " \u{0085}test3 \u{0085} \t \u{0085}test3\u{0085}\u{0085} " => "test3\u{0085}test3", " \u{2029}test4 \u{2029} \t \u{2029}test4\u{2029}\u{2029} " => "test4\u{2029}test4", " \ftest5 \f \t \ftest5\f\f " => "test5\ftest5", " \rtest6 \r \t \r\rtest6\r\r " => "test6\rtest6", ]; $i = 0; $pattern = '~(*ANY)\A\s*\R|\s*(?!\r\n)\s$~mu'; foreach($tests as $input => $output) { echo 'Test', ++$i, ': ', (preg_replace($pattern, '', $input) === $output ? 'SUCCESS':'FAIL'), PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
Test1: SUCCESS Test2: SUCCESS Test3: SUCCESS Test4: SUCCESS Test5: SUCCESS Test6: SUCCESS

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.17 ms | 405 KiB | 5 Q