3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "'\""; $arr = array(); $arr[] = "string : ".$str; $arr[] = "addslashes : ".addslashes($str); $arr[] = "stripslashes : ".stripslashes($str); $arr[] = "htmlentities : ".htmlentities($str); if($str == '\'"'){ $arr[] = "testing : '".$str."'"; } print_r($arr);
Output for 4.3.0 - 7.2.0
Array ( [0] => string : '" [1] => addslashes : \'\" [2] => stripslashes : '" [3] => htmlentities : '&quot; [4] => testing : ''"' )