3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tzsp = new \DateTimeZone('America/Sao_Paulo'); $tzgmt = new \DateTimeZone('GMT-3'); $baseDate = \DateTime::createFromFormat(\DateTime::ISO8601, '2015-06-23T18:00:00-0300'); echo "GMT-3 ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzsp); echo "America/Sao_Paulo ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzgmt); echo "GMT-3 ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzsp); echo "America/Sao_Paulo ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzgmt); echo "GMT-3 ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzsp); echo "America/Sao_Paulo ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzgmt); echo "GMT-3 ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzsp); echo "America/Sao_Paulo ", $baseDate->format(\DateTime::ISO8601), "\n"; $baseDate->setTimezone($tzgmt); echo "GMT-3 ", $baseDate->format(\DateTime::ISO8601), "\n";

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
153.53 ms | 2868 KiB | 8 Q