3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime("2015-04-01 10:54:22"); echo "Fecha generacion: ".$date->format('c')."\n"; $startDate = clone $date; $startDate->sub(\DateInterval::createFromDateString('6 months')); $startDatete->setTime(0,0,0); echo "Fecha inicial: ".$startDate->format('c')."\n"; $endDate = clone $date; $endDate->sub(\DateInterval::createFromDateString('1 day')); $endDate->setTime(23,59,59); echo "Fecha final: ".$endDate->format('c')."\n";
Output for git.master, git.master_jit, rfc.property-hooks
Fecha generacion: 2015-04-01T10:54:22+02:00 Warning: Undefined variable $startDatete in /in/Gj2M8 on line 8 Fatal error: Uncaught Error: Call to a member function setTime() on null in /in/Gj2M8:8 Stack trace: #0 {main} thrown in /in/Gj2M8 on line 8
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:
37.02 ms | 401 KiB | 8 Q