3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo <<<HEREDOC TEST HEREDOC; // Because you are presumably rtrim()ing the input, if the last statement in the file is a heredoc/nowdoc // it results in a syntax error, because the trailing lf is part of the terminator. This comment will make // it work. Just do $input = rtrim($input) . "\n"; to fix. Strictly you should keep the trailing line break // anyway because of https://stackoverflow.com/a/729795/889949
Output for rfc.property-hooks, git.master, git.master_jit
TEST

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:
48.96 ms | 1371 KiB | 4 Q