3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo json_decode('"\u201E"'); // create a pair of curly quotes using \u which json_decode can handle ... $lefty = json_decode('"\u201C"'); $righty = json_decode('"\u201D"'); $text = $lefty . "Testing" . $righty; echo $text,"\n"; // ... but POCRE can't handle \u so use hex codes $text = mb_ereg_replace('[\xE2\x80]+(\x9C|\x9D)+','"',$text); echo "\n",$text;

preferences:
45.85 ms | 402 KiB | 5 Q