3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDateTime{ private $year, $month, $day, $hour, $minute, $second; public function __construct($year, $month, $day, $hour, $minute, $second) { $this->year = $year; $this->month = $month; $this->day = $day; $this->hour = $hour; $this->minute = $minute; $this->second = $second; } public function __debugInfo() { return array( 'date' => $this->year . "-" . $this->month . "-" . $this->day, 'time' => sprintf("%02d:%02d:%02d", $this->hour, $this->minute, $this->second), ); } } var_dump(new MyDateTime(2014, 9, 20, 16, 2, 41)); ?>
Output for git.master, git.master_jit, rfc.property-hooks
object(MyDateTime)#1 (2) { ["date"]=> string(9) "2014-9-20" ["time"]=> string(8) "16:02:41" }

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:
35.16 ms | 401 KiB | 8 Q