3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'foo'; ?> <?php class MyDB extends SQLite3 { function __construct() { $this->open('/home/oegget/hacking/rozze.db'); } } $db = new MyDB(); if(!$db){ echo $db->lastErrorMsg(); } else { echo "Opened database successfully\n"; } $sql =<<<EOF SELECT * from egget; EOF; $ret = $db->query($sql); while($row = $ret->fetchArray(SQLITE3_ASSOC) ){ echo "IMDB = ". $row['imdb'] . "<br>"; echo "NAME = ". $row['title'] ."<br><br>"; print "foo is $username"; } echo "Operation done successfully\n"; $db->close(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: SQLite3::open(): open_basedir restriction in effect. File(/home/oegget/hacking/rozze.db) is not within the allowed path(s): (/tmp:/in:/etc) in /in/MvFhP on line 11 Fatal error: Uncaught Exception: open_basedir prohibits opening /home/oegget/hacking/rozze.db in /in/MvFhP:11 Stack trace: #0 /in/MvFhP(11): SQLite3->open('/home/oegget/ha...') #1 /in/MvFhP(14): MyDB->__construct() #2 {main} thrown in /in/MvFhP on line 11
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:
39.69 ms | 406 KiB | 5 Q