3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pdo1 = new \PDO('sqlite::memory:'); $pdo1->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); echo "PDO 1 is OK\n"; $pdo2 = clone $pdo1; $pdo2->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_WARNING); echo "PDO 2 is OK\n"; echo $pdo1->getAttribute(\PDO::ATTR_ERRMODE) === $pdo2->getAttribute(\PDO::ATTR_ERRMODE) ? "❌ The attribute IS changed\n" : "✅ The attribute IS NOT changed\n";
Output for git.master, git.master_jit, rfc.property-hooks
PDO 1 is OK Fatal error: Uncaught Error: Trying to clone an uncloneable object of class PDO in /in/vQg4S:7 Stack trace: #0 {main} thrown in /in/vQg4S on line 7
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:
149.78 ms | 405 KiB | 5 Q