3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function send_notification($params) { $message = stripslashes(str_replace('\n', '', $params['message'])); $message = $message; $userid = $params['userid']; $date = date('Y-m-d H:i:s'); var_dump("INSERT INTO userNot(userid, message, date) VALUES('".$userid."', '".$message."', '".$date."')"); } $nick = '?A users username?'; $myid = '1234567890'; $msg = 'Whatsup?'; $params = array( 'message' => $nick.' has sent you a new message: '.$msg, 'userid' => $myid ); send_notification($params);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(145) "INSERT INTO userNot(userid, message, date) VALUES('1234567890', '?A users username? has sent you a new message: Whatsup?', '2014-06-27 15:51:31')"