3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDateTime{ public $year, $month, $day, $hour, $minute, $second; public function __debugInfo() { return array( $this->year . "-" . $this->month . "-" . $this->day, sprintf("%02d:%02d:%02d", $this->hour, $this->minute, $this->second), ); } } $dt = new MyDateTime(); $dt->year = 2014; $dt->month = 9; $dt->day = 20; $dt->hour = 16; $dt->minute = 2; $dt->second = 41; var_dump($dt); ?>
Output for git.master, git.master_jit, rfc.property-hooks
object(MyDateTime)#1 (2) { [0]=> string(9) "2014-9-20" [1]=> 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:
58.99 ms | 401 KiB | 8 Q