3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class myCustomThing { private $dt; public function __construct($date=NULL) { $this->dt = new DateTime($date); } public function __call($methodName, $args) { if (! method_exists($this, $methodName)) { return call_user_func_array([$this->dt, $methodName], $args); } } } $a = new myCustomThing('now'); echo $a->format('c');
based on gfIIa
Output for 5.6.0 - 7.3.0alpha1
2016-11-21T07:56:22+01:00