3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $text = "This is a string with 'single quotes' and " . '"double quotes" in it.'; echo $text."\n"; echo str_replace('"',"'",$text)."\n"; echo htmlentities($text,ENT_QUOTES); ?>
based on kuLmD
Output for 4.3.2 - 7.2.0
This is a string with 'single quotes' and "double quotes" in it. This is a string with 'single quotes' and 'double quotes' in it. This is a string with &#039;single quotes&#039; and &quot;double quotes&quot; in it.
Output for 4.3.0 - 4.3.1
This is a string with 'single quotes' and "double quotes" in it. This is a string with 'single quotes' and 'double quotes' in it.
Process exited with code 139.