3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $deliveryDateFrom = new DateTime('2015-09-20'); $actualDate = new DateTime('2015-09-10'); var_dump($actualDate >= $deliveryDateFrom->sub(new DateInterval($this->interval))); $deliveryDateFrom = new DateTime('2015-09-20'); $actualDate = new DateTime('2015-09-01'); var_dump($actualDate >= $deliveryDateFrom->sub(new DateInterval($this->interval))); $deliveryDateFrom = new DateTime('2015-09-20'); $actualDate = new DateTime('2015-09-20'); var_dump($actualDate >= $deliveryDateFrom->sub(new DateInterval($this->interval))); $deliveryDateFrom = new DateTime('2015-09-20'); $actualDate = new DateTime('2015-09-30'); var_dump($actualDate >= $deliveryDateFrom->sub(new DateInterval($this->interval)));
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/OVOtL:5 Stack trace: #0 {main} thrown in /in/OVOtL on line 5
Process exited with code 255.
Output for 5.3.18 - 5.6.21
Fatal error: Using $this when not in object context in /in/OVOtL on line 5
Process exited with code 255.