3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $Id: main.php,v 1.2 2015/09/13 07:23:44 IvoG Exp $ // The first page // HEADER //include ("header.php"); switch ($_GET["page"]) { // Sub Pages and main //******************************************************** // register as trainee //******************************************************** case "register": if (CheckReg($mysqli, $d->vid) == "1") { ?> <h3>Sorry, registration not avalaible, you have areally requested a registration (and still pending), or your subscription still in progress.</h3> <? include ("footer.php"); exit; } if (!$_POST['register']) { $requestnum = $d->ratingatc + 1; $requestname = RequestRating($requestnum); ?> <h3 class="page-title">Register</h3> <div class="gcontainer"> <form action="index.php?page=register" method="post" name="register"> <fieldset><legend>Registration to the school</legend> <label>[INSERT THE RULE'S HERE]: </label><span>bla bla bla</span> <label>You request school for: </label><span><? echo $requestname; ?></span> <label>I agree with the rule's</label> <span><input id="agree" type="checkbox" name="agree" value="agree"></span> </fieldset> <div class="color form-more"> <input name="register" class="submit" type="submit" value="Register"> </div> </form> </div> <? } else { if ($_POST["agree"] == "") { ?> <h3>Sorry, registration not avalaible, you don't have accepted the AUP. Return back and fullfill the rules, thank's</h3> <? include ("footer.php"); exit; } // 0 - registered, 1 - refused, 2 - accepted, 3 - in progress, 4 - end, 5 - expelled $request = $d->ratingatc + 1; $sql = "INSERT INTO application (id, vid, request, accepted, reason, class) VALUES ('', '$d->vid', '$request', '0', '', '')"; safecommit($mysqli, $sql, "<h4>Failed to register your application, please contact WM, thank's</h4>", "<h4>Registration done. You're been contacted back on your email for future info.</h4>"); } break; //******************************************************** // Default webpage //******************************************************** default: ?> <H4>Hi <? echo $d->firstname; ?> <? echo $d->lastname; ?> (<a href="https://www.ivao.aero/Member.aspx?Id=<? echo $d->vid; ?>"><? echo $d->vid; ?></a>)!<span class='notice'>Your rating ATC is <? echo RequestRating($d->ratingatc);?></span></H4> <span>Welcome to the school. You can request a subscription here.</span> <? /* print_r(CheckUser($d->vid)); print_r(CheckUser($d->vid)); echo '<pre>'; print_r($d); echo '</pre>'; */ // var_dump($d); break; // END switch }; // FOOTER //include ("footer.php"); ?>
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Parse error: Unclosed '{' on line 15 in /in/JfUYE on line 78
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Parse error: Unclosed '{' on line 15 in /in/JfUYE on line 78
Process exited with code 255.
Output for 8.0.13
Warning: Undefined array key "page" in /in/JfUYE on line 8 <H4>Hi Warning: Undefined variable $d in /in/JfUYE on line 62 Warning: Attempt to read property "firstname" on null in /in/JfUYE on line 62 Warning: Undefined variable $d in /in/JfUYE on line 62 Warning: Attempt to read property "lastname" on null in /in/JfUYE on line 62 (<a href="https://www.ivao.aero/Member.aspx?Id= Warning: Undefined variable $d in /in/JfUYE on line 62 Warning: Attempt to read property "vid" on null in /in/JfUYE on line 62 "> Warning: Undefined variable $d in /in/JfUYE on line 62 Warning: Attempt to read property "vid" on null in /in/JfUYE on line 62 </a>)!<span class='notice'>Your rating ATC is Fatal error: Uncaught Error: Call to undefined function RequestRating() in /in/JfUYE:62 Stack trace: #0 {main} thrown in /in/JfUYE on line 62
Process exited with code 255.
Output for 7.4.33
Notice: Undefined index: page in /in/JfUYE on line 8 <H4>Hi Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property 'firstname' of non-object in /in/JfUYE on line 62 Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property 'lastname' of non-object in /in/JfUYE on line 62 (<a href="https://www.ivao.aero/Member.aspx?Id= Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property 'vid' of non-object in /in/JfUYE on line 62 "> Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property 'vid' of non-object in /in/JfUYE on line 62 </a>)!<span class='notice'>Your rating ATC is Fatal error: Uncaught Error: Call to undefined function RequestRating() in /in/JfUYE:62 Stack trace: #0 {main} thrown in /in/JfUYE on line 62
Process exited with code 255.
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Parse error: syntax error, unexpected end of file in /in/JfUYE on line 78
Process exited with code 255.
Output for 7.3.32 - 7.3.33
<H4>Hi (<a href="https://www.ivao.aero/Member.aspx?Id="></a>)!<span class='notice'>Your rating ATC is Fatal error: Uncaught Error: Call to undefined function RequestRating() in /in/JfUYE:62 Stack trace: #0 {main} thrown in /in/JfUYE on line 62
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
Notice: Undefined index: page in /in/JfUYE on line 8 <H4>Hi Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 (<a href="https://www.ivao.aero/Member.aspx?Id= Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 "> Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 </a>)!<span class='notice'>Your rating ATC is Fatal error: Uncaught Error: Call to undefined function RequestRating() in /in/JfUYE:62 Stack trace: #0 {main} thrown in /in/JfUYE on line 62
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Notice: Undefined index: page in /in/JfUYE on line 8 <H4>Hi Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 (<a href="https://www.ivao.aero/Member.aspx?Id= Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 "> Notice: Undefined variable: d in /in/JfUYE on line 62 Notice: Trying to get property of non-object in /in/JfUYE on line 62 </a>)!<span class='notice'>Your rating ATC is Fatal error: Call to undefined function RequestRating() in /in/JfUYE on line 62
Process exited with code 255.

preferences:
170.76 ms | 402 KiB | 228 Q