3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dp = new DatePeriod(new DateTime('2010-01-01'), new DateInterval('P1D'), 2); $dp = new DateInterval('P2Y3W1D'); $r = new ReflectionObject($dp); $arr = (array)$dp; // cast to array to see the values of propeties echo "Properties:\r\n"; foreach($r->getProperties() as $v) { echo $v->getName()."\r\n"; } echo "\r\n"; echo "Methods:\r\n"; foreach($r->getMethods() as $v) { echo $v->getName()."\r\n"; } echo "\r\n"; echo "Array cast:\r\n"; echo strtr(print_r($arr, true), "\0", '_');
Output for git.master, git.master_jit, rfc.property-hooks
Properties: y m d h i s f invert days from_string Methods: __construct createFromDateString format __serialize __unserialize __wakeup __set_state Array cast: Array ( [y] => 2 [m] => 0 [d] => 22 [h] => 0 [i] => 0 [s] => 0 [f] => 0 [invert] => 0 [days] => [from_string] => )

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:
39.36 ms | 402 KiB | 8 Q