3v4l.org

run code in 300+ PHP versions simultaneously
<?Php require "config.php"; // Database connection $count="SELECT id,name, social, math, science, sum(social + math + science ) as total, sum(social + math + science )/3 as avg from student3 group by id"; echo "<table>"; echo "<tr><th>id</th><th>name</th><th>social</th><th>math</th><th>science</th><th>total</th><th>avg</th></tr>"; foreach ($dbo->query($count) as $row) { echo "<tr ><td>$row[id]</td><td>$row[name]</td><td>$row[social]</td><td>$row[math]</td><td>$row[science]</td><td>$row[total]</td><td>$row[avg]</td></tr>"; } echo "</table>"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: require(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/LNWto on line 2 Warning: require(config.php): Failed to open stream: Operation not permitted in /in/LNWto on line 2 Fatal error: Uncaught Error: Failed opening required 'config.php' (include_path='.:') in /in/LNWto:2 Stack trace: #0 {main} thrown in /in/LNWto on line 2
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:
35.53 ms | 401 KiB | 8 Q