3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = time(); date_default_timezone_set('UTC'); var_dump(date('Y-m-d h:m:sa', $now)); date_default_timezone_set("Africa/Cairo"); var_dump(date('Y-m-d h:m:sa', $now));
Output for 5.6.9 - 5.6.25, 7.0.0 - 7.0.8, 7.0.10 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
string(21) "2016-09-09 02:09:04pm" string(21) "2016-09-09 04:09:04pm"
Output for 5.6.0 - 5.6.8, 7.0.9
string(21) "2016-09-09 02:09:04pm" string(21) "2016-09-09 05:09:04pm"

preferences:
25.15 ms | 460 KiB | 5 Q