3v4l.org

run code in 300+ PHP versions simultaneously
<?php $flags = ENT_COMPAT; $text = "'&*\""; echo htmlspecialchars($text, $flags, 'UTF-8');

preferences:
45.62 ms | 402 KiB | 5 Q