3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { protected $db; public function __construct(PDO $db) { $this->db = $db; } public function doStuff() { // Access DB: $this->db; //->exec('Select ..."'); } } $db = new PDO('mysql:dbname=testdb;host=127.0.0.1', 'dbuser', 'dbpass'); $user = new User($db);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught PDOException: could not find driver in /in/qcZ1A:18 Stack trace: #0 /in/qcZ1A(18): PDO->__construct('mysql:dbname=te...', 'dbuser', Object(SensitiveParameterValue)) #1 {main} thrown in /in/qcZ1A on line 18
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:
44.9 ms | 401 KiB | 8 Q