3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = new Data(); class Data { function __construct(){ if(!isset($_SESSION['id'])){ header('location:../../'); } } function getSubject($search){ global $con; $q = "select * from subject where code like '%$search%' or title like '%$search%' order by code asc"; $r = mysqli_query($con, $q) or die(mysqli_error($con)); return $subjects = mysqli_fetch_all($r,MYSQLI_ASSOC); } } <?php include "data/data_model.php"; $search = isset($_POST["search"]); $subject = $data->getSubject($search); ?> <form action="subject.php" method="post"> <label> <input type="text" class="form-control" name="search" placeholder="Search Subject..." > </label> <button type="submit" name="search" class="btn btn-success" value="search"><i class="fa fa-search"></i> Search</button> </form>
Output for git.master_jit, git.master
Parse error: syntax error, unexpected token "<", expecting end of file in /in/rfAiq on line 21
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
38.18 ms | 635 KiB | 3 Q