3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime('now', new \DateTimeZone('UTC')); $currentHour = (int)$date->format('G'); var_dump($currentHour);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.11 ms | 1221 KiB | 11 Q