3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $prizes = array ( 1 => array ( 'from' => DateTime::__set_state(array( 'date' => '2014-04-22 00:00:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'to' => DateTime::__set_state(array( 'date' => '2014-05-18 23:59:59', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'date' => DateTime::__set_state(array( 'date' => '2014-06-06 20:45:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'name' => 'Deutschland vs.<br/>Armenien', 'desc' => '06. Juni 2014<br/>In Mainz<br/>Exklusiver Einlass: 18:30 Uhr<br/>Anpfiff: 20:45 Uhr', 'img' => 'armenien.jpg', 'expired' => true, ), 2 => array ( 'from' => DateTime::__set_state(array( 'date' => '2014-04-22 00:00:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'to' => DateTime::__set_state(array( 'date' => '2014-08-21 23:59:59', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'date' => DateTime::__set_state(array( 'date' => '2014-09-07 20:45:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'name' => 'Deutschland vs.<br/>Schottland', 'desc' => '07. September 2014<br/>In Dortmund<br/>Exklusiver Einlass: 18:30 Uhr<br/>Anpfiff: 20:45 Uhr', 'img' => 'schottland.jpg', ), 3 => array ( 'from' => DateTime::__set_state(array( 'date' => '2014-04-22 00:00:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'to' => DateTime::__set_state(array( 'date' => '2014-09-24 23:59:59', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'date' => DateTime::__set_state(array( 'date' => '2014-10-14 20:45:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'name' => 'Deutschland vs.<br/>Irland', 'desc' => '14. Oktober 2014<br/>In Gelsenkirchen<br/>Exklusiver Einlass: 18:30 Uhr<br/>Anpfiff: 20:45 Uhr', 'img' => 'irland.jpg', ), 4 => array ( 'from' => DateTime::__set_state(array( 'date' => '2014-04-22 00:00:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'to' => DateTime::__set_state(array( 'date' => '2014-10-29 23:59:59', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'date' => DateTime::__set_state(array( 'date' => '2014-11-14 20:45:00', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )), 'name' => 'Deutschland vs.<br/>Gibraltar', 'desc' => '14. November 2014<br/>In Bremen<br/>Exklusiver Einlass: 18:30 Uhr<br/>Anpfiff: 20:45 Uhr', 'img' => 'gibraltar.jpg', ), ); foreach ($prizes as $id => $prize) { if (isset($prize['expired']) && $prize['expired'] === true) { echo $prize['img']; } }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
armenien.jpg
Output for hhvm-3.12.0
Fatal error: Uncaught Error: Call to undefined method DateTime::__set_state() in /in/HThe6:11 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: Call to undefined method DateTime::__set_state() in /in/HThe6 on line 11
Process exited with code 255.
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::__set_state() in /in/HThe6 on line 7
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/HThe6 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/HThe6 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/HThe6 on line 7