3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date1 = new \DateTime('2024-09-01'); if ($date->format('m') > 9) { $tax = new \DateTime(($date1->format('Y')+1) . '-09-30'); } else { $tax = new \DateTime($date1->format('Y') . '-09-30'); } print_r($tax);
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $date in /in/H8VN1 on line 4 Fatal error: Uncaught Error: Call to a member function format() on null in /in/H8VN1:4 Stack trace: #0 {main} thrown in /in/H8VN1 on line 4
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:
34.78 ms | 409 KiB | 6 Q