3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "24/04/2017 15:45pm"; $d = DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s', $string, new DateTimeZone("UTC"))->setTimezone(new DateTimeZone("Europe/London")); var_export($d, true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/luXVf
function name:  (null)
number of ops:  21
compiled vars:  !0 = $string, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '24%2F04%2F2017+15%3A45pm'
    4     1        INIT_STATIC_METHOD_CALL                                  'DateTimeImmutable', 'createFromFormat'
          2        SEND_VAL                                                 'Y-m-d%5CTH%3Ai%3As'
          3        SEND_VAR                                                 !0
          4        NEW                                              $3      'DateTimeZone'
          5        SEND_VAL_EX                                              'UTC'
          6        DO_FCALL                                      0          
          7        SEND_VAR                                                 $3
          8        DO_FCALL                                      0  $5      
          9        INIT_METHOD_CALL                                         $5, 'setTimezone'
         10        NEW                                              $6      'DateTimeZone'
         11        SEND_VAL_EX                                              'Europe%2FLondon'
         12        DO_FCALL                                      0          
         13        SEND_VAR_NO_REF_EX                                       $6
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !1, $8
    6    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.9 ms | 1395 KiB | 15 Q