3v4l.org

run code in 300+ PHP versions simultaneously
<?php use PDO; class Test { protected $options = [ PDO::ATTR_CASE => PDO::CASE_NATURAL, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, PDO::ATTR_STRINGIFY_FETCHES => false, PDO::ATTR_EMULATE_PREPARES => false ]; /** * Get the PDO options. * */ public function getOptions(array $config) { $options = $config['options']; return array_diff($this->options, $options) + $options; } } $config = []; Test::getOptions($config);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: The use statement with non-compound name 'PDO' has no effect in /in/Qh8ap on line 3 Fatal error: Uncaught Error: Non-static method Test::getOptions() cannot be called statically in /in/Qh8ap:27 Stack trace: #0 {main} thrown in /in/Qh8ap on line 27
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:
58.52 ms | 401 KiB | 8 Q