3v4l.org

run code in 300+ PHP versions simultaneously
<?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); ?>

preferences:
53.29 ms | 402 KiB | 5 Q