3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $post_data = array(); $pnt_no = isset($_REQUEST['trnno']) ? $_REQUEST['trnno']:''); $rtype = isset($_REQUEST['rtype']) ? $_POST['rtype']: ''); //create array of data to be posted $post_data['lccp_trnname'] = $pnt_no; $post_data['getIt'] = "Wait For PNR Enquiry!"; $url = 'http://www.indianrail.gov.in/cgi_bin/inet_trnnum_cgi.cgi'; $data = http_build_query($post_data); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($post_data)); curl_setopt($ch,CURLOPT_POSTFIELDS, $data); $result = curl_exec($ch); curl_close($ch); echo $result;
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.27
Parse error: syntax error, unexpected ')' in /in/0jvPX on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ')' in /in/0jvPX on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/0jvPX on line 5
Process exited with code 255.