3v4l.org

run code in 500+ PHP versions simultaneously
<?php class UrlConcrete { /** * @param DateTime|null $lastmod * * @return UrlConcrete */ public function setLastmod(DateTime $lastmod = null) { $this->lastmod = $lastmod; return $this; } } $x = new UrlConcrete(); $x->setLastmod(new \DateTime()); $x->setLastmod(new stdclass());
Output for git.master, rfc.property-hooks, git.master_jit
Deprecated: Creation of dynamic property UrlConcrete::$lastmod is deprecated in /in/kgBOL on line 12 Fatal error: Uncaught TypeError: UrlConcrete::setLastmod(): Argument #1 ($lastmod) must be of type ?DateTime, stdClass given, called in /in/kgBOL on line 20 and defined in /in/kgBOL:10 Stack trace: #0 /in/kgBOL(20): UrlConcrete->setLastmod(Object(stdClass)) #1 {main} thrown in /in/kgBOL on line 10
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:
47.33 ms | 2774 KiB | 4 Q