3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php<?php session_start(); if($_SESSION["userid"]=="" || $_SESSION["userType"] == 'U') { header("location: index.php"); } include("object/SiteObject.php"); $obj=new SiteObject(); $siteId= $_POST["siteName"]; $plotId=$_POST["plotNo"]; $bookList=$obj->getBookingList($siteId,$plotId); if($_POST['submit']=='REGISTRATION'){ $obj->goRegister($_POST); } if($_POST['submit']=='INSTALLMENT REGISTRATION'){ $obj->goInstallmentRegister($_POST); } if($_REQUEST['installment'] == 'Y'){ $bal=0; $availBal=$bookList['plot_sale_value']-($bookList['booking_amt']+$bookList['discount_amount']); } else { $bal=$bookList['plot_sale_value']-($bookList['booking_amt']+$bookList['discount_amount']); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>.:: Aathava Group ::.</title> <link href="css/main.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-base.css" /> <link rel="stylesheet" type="text/css" href="ddlevelsfiles/ddlevelsmenu-topbar.css" /> <link rel="stylesheet" type="text/css" href="js/aqua.css"> <script type="text/javascript" src="ddlevelsfiles/ddlevelsmenu.js"></script> <script language="javascript" type="text/javascript" src="js/utils.js"></script> <script language="javascript" type="text/javascript" src="js/calendar.js"></script> <script language="javascript" type="text/javascript" src="js/calendar-setup.js"></script> <script language="javascript" type="text/javascript" src="js/calendar-en.js"></script> <script type="text/javascript" src="js/validation.js"></script> <script type="text/javascript" src="js/common.js"></script> </head> <body> <form name="registration" method="post"> <div id="mainContainer"> <?php include('common/menu.php');?> <!--Content Panel Code Begin--> <div id="contentArea"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <div class="h2Header">.:: Plot Registration</div> <div class="formPanel"> <table width="100%" border="0" cellspacing="12" cellpadding="0" align="center"> <input type="hidden" name="id" id="id" value="<? echo $bookList['booking_id'];?>"/> <input type="hidden" name="siteId" id="siteId" value="<? echo $bookList['site_id'];?>"/> <input type="hidden" name="plotId" id="plotId" value="<? echo $bookList['plot_id'];?>"/> <input type="hidden" name="amount" id="amount" value="<? echo $bookList['plot_sale_value'];?>"/> <input type="hidden" name="install" id="install" value="<? echo $_REQUEST['installment'];?>"/> <tr> <td width="17%" class="Lable">Booking Code</td> <td class="Lable" width="30%"><font color="blue"><? echo $bookList['booking_code'];?></font></td> <td class="Lable" width="17%">Booking Date</td> <td class="Lable"><font color="blue"><? echo $bookList['booking_date'];?></font></td> </tr> <tr> <td class="Lable">Site Name</td> <td class="Lable"><font color="blue"><? echo $bookList['site_name'];?></font></td> <td class="Lable">plot no</td> <td class="Lable"><font color="blue"><? echo $bookList['plot_no'];?></font></td> </tr> <tr> <td class="Lable">Plot Sqft</td> <td class="Lable"><font color="blue"><? echo $bookList['sqft'];?></font></td> <td class="Lable">Plot Value</td> <td class="Lable"><font color="blue"><? echo $bookList['plot_sale_value'];?></font></td> </tr> <tr> <td class="Lable">Paid Amount</td> <td class="Lable"><font color="blue"><? echo $bookList['booking_amt'];?></font></td> <td class="Lable">Discount Amount</td> <td class="Lable"><font color="blue"><? echo $bookList['discount_amount'];?></font></td> </tr> <tr> <td class="Lable">Total Amount</td> <td class="Lable"><font color="blue"><? echo ($bookList['booking_amt']+$bookList['discount_amount']);?></font></td> <td class="Lable">Balance</td> <td class="Lable"><font color="blue"><? echo ($bookList['plot_sale_value']-($bookList['booking_amt']+$bookList['discount_amount']))?></font></td> </tr> <tr> <td class="Lable">Customer Name</td> <td class="Lable"><font color="blue"><? echo $bookList['cust_name'];?></font></td> <td class="Lable">Customer Address</td> <td class="Lable"><font color="blue"><? echo $bookList['cust_address'];?></font></td> </tr> <tr> <td class="Lable">Registration Date</td> <td><input type="text" name="regDate" id="regDate" class="InputText" readOnly="true"/> <IMG id="dateImg" src="images/calendar.gif" BORDER="0" title="Calendar" /> <script type="text/javascript"> var cal = new Zapatec.Calendar.setup({ inputField:"regDate", ifFormat:"%d-%m-%Y", button:"dateImg", showsTime:false }); </script> </td> <td class="Lable">Registration Office</td> <td><input type="text" name="regOffice" id="regOffice" class="InputText"/></td> </tr> <?if($_REQUEST['installment'] == 'Y' && $availBal > 0) {?> <tr> <td class="Lable">No.of Installment</td> <td><input type="text" name="noofinstall" id="noofinstall" maxlength="2" class="InputText"/></td> <td class="Lable">Duration</td> <td><input type="text" name="duration" maxlength="3" id="duration" class="InputText"/></td> </tr> <?}?> <tr> <td class="Lable">Narration</td> <td><textArea type="text" name="narration" id="narration" class="InputText"></textArea></td> </tr> <?if($_REQUEST['installment'] == 'Y') {?> <tr> <td>&nbsp;</td> <td colspan="3"><?if($bal == 0) {?> <input type="submit" value="INSTALLMENT REGISTRATION" name="submit" class="button" onclick="return checkPlotRegistration();"/>&nbsp;&nbsp;&nbsp;<?}?> <input type="button" value="CANCEL" class="button" onclick="doRegCancel();"/></td> </tr> <?} else {?> <tr> <td>&nbsp;</td> <td colspan="3"><?if($bal == 0) {?> <input type="submit" value="REGISTRATION" name="submit" class="button" onclick="return checkPlotRegistration();"/>&nbsp;&nbsp;&nbsp;<?}?> <input type="button" value="CANCEL" class="button" onclick="doRegCancel();"/></td> </tr> <?}?> </table> </div> </td> </tr> </table> <!--Content Panel Code Begin--> <?php include('common/footer.php');?> </div> </form> </body> </html>
Output for 5.4.0 - 5.5.8
Parse error: syntax error, unexpected '?' in /in/qNlpV on line 1
Process exited with code 255.
Output for 5.3.0 - 5.3.28
<?php Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Notice: Undefined index: userid in /in/qNlpV on line 3 Warning: Cannot modify header information - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 4 Warning: include(object/SiteObject.php): failed to open stream: No such file or directory in /in/qNlpV on line 7 Warning: include(): Failed opening 'object/SiteObject.php' for inclusion (include_path='.:') in /in/qNlpV on line 7 Fatal error: Class 'SiteObject' not found in /in/qNlpV on line 8
Process exited with code 255.
Output for 5.2.3 - 5.2.17
<?php Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Notice: Undefined index: userid in /in/qNlpV on line 3 Warning: Cannot modify header information - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 4 Warning: include(object/SiteObject.php): failed to open stream: No such file or directory in /in/qNlpV on line 7 Warning: include(): Failed opening 'object/SiteObject.php' for inclusion (include_path='.:') in /in/qNlpV on line 7 Fatal error: Class 'SiteObject' not found in /in/qNlpV on line 8
Process exited with code 255.
Output for 5.1.0 - 5.2.2
<?php Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Notice: Undefined index: userid in /in/qNlpV on line 3 Warning: include(object/SiteObject.php): failed to open stream: No such file or directory in /in/qNlpV on line 7 Warning: include(): Failed opening 'object/SiteObject.php' for inclusion (include_path='.:') in /in/qNlpV on line 7 Fatal error: Class 'SiteObject' not found in /in/qNlpV on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
<?php Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Notice: Undefined index: userid in /in/qNlpV on line 3 Warning: main(object/SiteObject.php): failed to open stream: No such file or directory in /in/qNlpV on line 7 Warning: main(): Failed opening 'object/SiteObject.php' for inclusion (include_path='.:') in /in/qNlpV on line 7 Fatal error: Class 'SiteObject' not found in /in/qNlpV on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.9
<?php Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Notice: Undefined index: userid in /in/qNlpV on line 3 Warning: main(object/SiteObject.php): failed to open stream: No such file or directory in /in/qNlpV on line 7 Warning: main(): Failed opening 'object/SiteObject.php' for inclusion (include_path='.:') in /in/qNlpV on line 7 Fatal error: Cannot instantiate non-existent class: siteobject in /in/qNlpV on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<?php Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cookie - headers already sent by (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Warning: session_start() [http://www.php.net/function.session-start]: Cannot send session cache limiter - headers already sent (output started at /in/qNlpV:1) in /in/qNlpV on line 2 Notice: Undefined index: userid in /in/qNlpV on line 3 Warning: main(object/SiteObject.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/qNlpV on line 7 Warning: main() [http://www.php.net/function.main]: Failed opening 'object/SiteObject.php' for inclusion (include_path='.:') in /in/qNlpV on line 7 Fatal error: Cannot instantiate non-existent class: siteobject in /in/qNlpV on line 8