3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($errno, $errstr){ throw new Exception($errstr);}); class DateTimeCustom extends DateTime { public function __construct($datetime, $timezone = null) { try { parent::__construct($datetime, $timezone); } catch (Exception $e) { var_dump($this, parent::getLastErrors(), parent::format()); } } } $date = new DateTimeCustom("Funktionsansvarig rÄdgivning och juridik", "UTC");
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: DateTime::__construct(): Argument #2 ($timezone) must be of type ?DateTimeZone, string given in /in/WVfIv:11 Stack trace: #0 /in/WVfIv(11): DateTime->__construct('Funktionsansvar...', 'UTC') #1 /in/WVfIv(21): DateTimeCustom->__construct('Funktionsansvar...', 'UTC') #2 {main} thrown in /in/WVfIv on line 11
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:
43.67 ms | 401 KiB | 8 Q