3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo 'this is a simple string'; echo 'You can also have embedded newlines in strings this way as it is okay to do'; // Outputs: Arnold once said: "I'll be back" echo 'Arnold once said: "I\'ll be back"'; // Outputs: You deleted C:\*.*? echo 'You deleted C:\\*.*?'; // Outputs: You deleted C:\*.*? echo 'You deleted C:\*.*?'; // Outputs: This will not expand: \n a newline echo 'This will not expand: \n a newline'; // Outputs: Variables do not $expand $either echo 'Variables do not $expand $either'; ?>
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.1
this is a simple stringYou can also have embedded newlines in strings this way as it is okay to doArnold once said: "I'll be back"You deleted C:\*.*?You deleted C:\*.*?This will not expand: \n a newlineVariables do not $expand $either