3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $EMAIL_FROM = 'MobileWays Notify'; $EMAIL_TO = 'suman.varanasi@gmail.com'; $SUBJECT = 'Transaction Test'; $BODY = 'SECURITY CHECK'; $HEADER = "From:" . $EMAIL_FROM; $data = "{""name"":""Testing"",""email"":""Testing"",""subject"":""Testing",""message"":""ACTIVE""}"; $data_string = json_encode($data); $ch = curl_init('http://jaamoon.in/services/contactus'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); echo "<script type='text/javascript'>alert('$result');</script>"; ?>
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '"name"' (T_CONSTANT_ENCAPSED_STRING) in /in/10W1e on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/10W1e on line 8
Process exited with code 255.