3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.3.0 - 8.3.6
<?php Warning: session_start(): Session cannot be started after headers have already been sent in /in/qNlpV on line 2 Warning: Undefined global variable $_SESSION in /in/qNlpV on line 3 Warning: Trying to access array offset on null 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(): open_basedir restriction in effect. File(object/SiteObject.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/qNlpV on line 7 Warning: include(object/SiteObject.php): Failed to open stream: Operation not permitted 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: Uncaught Error: Class "SiteObject" not found in /in/qNlpV:8 Stack trace: #0 {main} thrown in /in/qNlpV on line 8
Process exited with code 255.
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
<?php Warning: session_start(): Session cannot be started after headers have already been sent in /in/qNlpV on line 2 Warning: Undefined global variable $_SESSION in /in/qNlpV on line 3 Warning: Trying to access array offset on value of type null 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(): open_basedir restriction in effect. File(object/SiteObject.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/qNlpV on line 7 Warning: include(object/SiteObject.php): Failed to open stream: Operation not permitted 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: Uncaught Error: Class "SiteObject" not found in /in/qNlpV:8 Stack trace: #0 {main} thrown in /in/qNlpV on line 8
Process exited with code 255.
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30
<?php Warning: session_start(): Session cannot be started after headers have already been sent in /in/qNlpV on line 2 Warning: Undefined variable $_SESSION in /in/qNlpV on line 3 Warning: Trying to access array offset on value of type null 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(): open_basedir restriction in effect. File(object/SiteObject.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/qNlpV on line 7 Warning: include(object/SiteObject.php): Failed to open stream: Operation not permitted 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: Uncaught Error: Class "SiteObject" not found in /in/qNlpV:8 Stack trace: #0 {main} thrown in /in/qNlpV on line 8
Process exited with code 255.
Output for 8.0.13
Parse error: syntax error, unexpected token "?" in /in/qNlpV on line 1
Process exited with code 255.
Output for 5.4.0 - 5.4.24, 5.5.0 - 5.5.8, 7.3.32 - 7.3.33, 7.4.26, 7.4.33
Parse error: syntax error, unexpected '?' in /in/qNlpV on line 1
Process exited with code 255.
Output for 7.4.3 - 7.4.25, 7.4.27 - 7.4.32
<?php Warning: session_start(): Cannot start session when headers already sent in /in/qNlpV on line 2 Notice: Undefined variable: _SESSION in /in/qNlpV on line 3 Notice: Trying to access array offset on value of type null 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(): open_basedir restriction in effect. File(object/SiteObject.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/qNlpV on line 7 Warning: include(object/SiteObject.php): failed to open stream: Operation not permitted 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: Uncaught Error: Class 'SiteObject' not found in /in/qNlpV:8 Stack trace: #0 {main} thrown in /in/qNlpV on line 8
Process exited with code 255.
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
<?php Warning: session_start(): Cannot start session when headers already sent in /in/qNlpV on line 2 Notice: Undefined variable: _SESSION 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(): open_basedir restriction in effect. File(object/SiteObject.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/qNlpV on line 7 Warning: include(object/SiteObject.php): failed to open stream: Operation not permitted 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: Uncaught Error: Class 'SiteObject' not found in /in/qNlpV:8 Stack trace: #0 {main} thrown in /in/qNlpV on line 8
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.1.6, 5.2.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.3.11, 4.4.0 - 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

preferences:
188.52 ms | 403 KiB | 256 Q