3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sanitize($data) { return strtolower(str_replace(['’',';',"'",':',"&#039;","&#8217;",'&apos;','&quot;',' ','`','delete','update','drop','create'], '', htmlspecialchars($data) )); } echo sanitize("Joe's Diner");

preferences:
301.05 ms | 1422 KiB | 5 Q