3v4l.org

run code in 500+ PHP versions simultaneously
<?php class DatabaseConnection { } class Query { public function __construct(DatabaseConnection $connection, $options) { } } class SelectQuery extends Query { public function __construct($table, $alias = NULL, DatabaseConnection $connection = NULL, $options = array()) { parent::__construct($connection, $options); } } $db = new DatabaseConnection(); $select = new SelectQuery('table', NULL, NULL, array());
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Query::__construct(): Argument #1 ($connection) must be of type DatabaseConnection, null given, called in /in/A3j9G on line 15 and defined in /in/A3j9G:8 Stack trace: #0 /in/A3j9G(15): Query->__construct(NULL, Array) #1 /in/A3j9G(20): SelectQuery->__construct('table', NULL, NULL, Array) #2 {main} thrown in /in/A3j9G on line 8
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.97 ms | 1576 KiB | 4 Q