3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $billingDate = new \DateTime('2017-02-15'); $todayDate = new \DateTime(); $interval = date_diff($billingDate, $todayDate); $this->feePackageInfo->setDaysLeft($interval->d); echo $interval->d;
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/d42qs:6 Stack trace: #0 {main} thrown in /in/d42qs on line 6
Process exited with code 255.
Output for 5.3.21 - 5.6.21
Fatal error: Using $this when not in object context in /in/d42qs on line 6
Process exited with code 255.