3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = array('2014' => 0); end($date); echo key($graph).'<br/>'; $newDate = new DateTime(key($date)); echo $newDate->format('Y').'<br/>';
Output for 7.0.20 - 7.2.0
Notice: Undefined variable: graph in /in/IFjNt on line 4 Warning: key() expects parameter 1 to be array, null given in /in/IFjNt on line 4 <br/>2015<br/>
Output for 7.0.0 - 7.0.6
Notice: Undefined variable: graph in /in/IFjNt on line 4 Warning: key() expects parameter 1 to be array, null given in /in/IFjNt on line 4 <br/>2016<br/>
Output for 5.3.18 - 5.4.45, 5.6.28
Warning: key() expects parameter 1 to be array, null given in /in/IFjNt on line 4 <br/>2015<br/>
Output for 5.5.24 - 5.6.21
Warning: key() expects parameter 1 to be array, null given in /in/IFjNt on line 4 <br/>2016<br/>