3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public function __construct(array $values) { print_r($values); } public static function getInstance($db) { $result = $db->query("SELECT * from test"); return new test($result->fetchArray(SQLITE3_ASSOC)); } } $db = new SQLite3("test.sqlite", SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); $db->query("CREATE TABLE test (foo, bar)"); test::getInstance($db); print "done";
Output for git.master_jit, git.master, rfc.property-hooks
Warning: SQLite3::__construct(): open_basedir restriction in effect. File(/test.sqlite) is not within the allowed path(s): (/tmp:/in:/etc) in /in/2RTmr on line 13 Fatal error: Uncaught Exception: open_basedir prohibits opening /test.sqlite in /in/2RTmr:13 Stack trace: #0 /in/2RTmr(13): SQLite3->__construct('test.sqlite', 6) #1 {main} thrown in /in/2RTmr on line 13
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:
52.6 ms | 402 KiB | 8 Q