3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zone = new \DateTimeZone( 'GMT' ); $oneOfSeptember2015 = \DateTime::createFromFormat('Y-m-d H:i:s', '2015-09-01', $zone); $oneOfSeptember2014 = \DateTime::createFromFormat('Y-m-d H:i:s', '2014-09-01', $zone); $diff = $now->diff( $oneOfSeptember2015, TRUE ); $dayOfDifference = $diff->format( '%d' ); var_dump( $dayOfDifference );
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $now in /in/BVdfv on line 7 Fatal error: Uncaught Error: Call to a member function diff() on null in /in/BVdfv:7 Stack trace: #0 {main} thrown in /in/BVdfv on line 7
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:
51.98 ms | 401 KiB | 8 Q