3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set("Australia/Adelaide"); $checkDateTimeUTC = ""; //$D = '20130412'; //$T = '110101'; if (($D > "") and ($T > "")) { //D=20130412&T=110101 $datum = gmdate("Y-m-d"); //YYYYMMDD UTC $tijd = gmdate("H:i:s"); //hhmmss UTC $time_string = substr($D, 0, 4) . "-" . substr($D, 4, 2) . "-" . substr($D, 6, 2) . " " . substr($T, 0, 2) . ":" . substr($T, 2, 2) . ":" . substr($T, 4, 2); echo $time_string; echo "\r\n"; echo $checkDateTimeUTC = gmdate('Y-m-d\TH:i:s\Z', strtotime($time_string)); } else { echo $checkDateTimeUTC = gmdate('Y-m-d\TH:i:s\Z'); } ?>
based on v6B45
Output for 5.6.28, 7.0.20 - 7.2.0
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:46Z
Output for 7.0.6
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-05-03T17:52:00Z
Output for 7.0.5
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-03T06:11:52Z
Output for 7.0.4
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-10T19:06:19Z
Output for 7.0.3
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-18T20:27:22Z
Output for 7.0.2
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-23T02:41:08Z
Output for 7.0.1
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-24T05:58:05Z
Output for 7.0.0
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-27T06:52:37Z
Output for 5.6.21
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-05-02T13:00:06Z
Output for 5.6.20
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-10T05:13:05Z
Output for 5.6.19
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-08T03:18:56Z
Output for 5.6.18
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-15T12:08:52Z
Output for 5.6.17
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-19T23:44:03Z
Output for 5.6.16
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-28T07:41:44Z
Output for 5.6.15
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-29T08:31:19Z
Output for 5.6.14
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-02T10:21:16Z
Output for 5.6.13
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-15T14:52:33Z
Output for 5.6.12
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-20T05:19:18Z
Output for 5.6.11
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-24T11:44:08Z
Output for 5.6.10
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-25T13:47:55Z
Output for 5.6.9
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-27T18:56:19Z
Output for 5.6.8
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-30T03:45:15Z
Output for 5.5.35
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-05-22T21:57:34Z
Output for 5.5.34
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-11T07:24:27Z
Output for 5.5.33
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-09T06:11:36Z
Output for 5.5.32
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-17T16:00:25Z
Output for 5.5.31
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-03-21T02:49:32Z
Output for 5.5.30
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-01T10:24:03Z
Output for 5.5.29
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-17T05:10:33Z
Output for 5.5.28
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-21T08:35:08Z
Output for 5.5.27
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-22T10:17:53Z
Output for 5.5.26
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-26T16:28:32Z
Output for 5.5.25
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-04-28T23:52:06Z
Output for 5.5.24
Notice: Undefined variable: D in /in/Ne6bu on line 6 2016-05-24T06:03:12Z
Output for 5.4.45
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:49Z
Output for 5.4.44
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:50Z
Output for 5.4.43
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:51Z
Output for 5.4.41 - 5.4.42
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:52Z
Output for 5.4.39 - 5.4.40
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:53Z
Output for 5.4.36 - 5.4.38
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:54Z
Output for 5.4.34 - 5.4.35
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:55Z
Output for 5.3.29, 5.4.31 - 5.4.32
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:56Z
Output for 5.4.28 - 5.4.30
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:57Z
Output for 5.4.25 - 5.4.27
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:58Z
Output for 5.3.28, 5.4.22 - 5.4.24
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T08:59:59Z
Output for 5.4.18 - 5.4.21
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T09:00:00Z
Output for 5.3.27, 5.4.16 - 5.4.17
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T09:00:01Z
Output for 5.3.25 - 5.3.26, 5.4.14 - 5.4.15
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T09:00:02Z
Output for 5.3.21 - 5.3.24, 5.4.12 - 5.4.13
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T09:00:03Z
Output for 5.3.20, 5.4.10 - 5.4.11
Notice: Undefined variable: D in /in/Ne6bu on line 6 2015-12-01T09:00:04Z