3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function sql($data){ $data = urldecode($data); if (is_numeric($data)) { return $data; } else if (!get_magic_quotes_gpc()) { return mysql_real_escape_string($data); } else { return $data; } } print(sql(''''toto')) ?>
based on fZnD8
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in /in/E0IKi on line 20
Process exited with code 255.
Output for 5.4.11 - 5.6.16
Parse error: syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING) in /in/E0IKi on line 20
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/E0IKi on line 20
Process exited with code 255.