3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('WST'); $d = new DateTime('2008-03-01'); $a = new DateTime('2018-03-01'); var_dump($d->diff($a)->y); date_default_timezone_set('Europe/Amsterdam'); $d = new DateTime('2008-03-01'); $a = new DateTime('2018-03-01'); var_dump($d->diff($a)->y);
based on NGIFX
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Notice: date_default_timezone_set(): Timezone ID 'WST' is invalid in /in/08V0S on line 4 int(9) int(9)
Output for hhvm-3.22.0
Notice: Timezone ID 'WST' is invalid in /in/08V0S on line -1 int(9) int(9)
Output for hhvm-3.18.5 - 3.21.3
Notice: Timezone ID 'WST' is invalid in /in/08V0S on line 4 int(9) int(9)