3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('DateTimeImmutable')) { $d = new DateTimeImmutable('2012-02-01 00:00:00.123456'); $d = $d->setTimeZone(new DateTimeZone('UTC')); echo $d->format('u'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/qTcHf
function name:  (null)
number of ops:  20
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'DateTimeImmutable'
          2        DO_ICALL                                         $1      
          3      > JMPZ                                                     $1, ->19
    4     4    >   NEW                                              $2      'DateTimeImmutable'
          5        SEND_VAL_EX                                              '2012-02-01+00%3A00%3A00.123456'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
    5     8        INIT_METHOD_CALL                                         !0, 'setTimeZone'
          9        NEW                                              $5      'DateTimeZone'
         10        SEND_VAL_EX                                              'UTC'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $5
         13        DO_FCALL                                      0  $7      
         14        ASSIGN                                                   !0, $7
    6    15        INIT_METHOD_CALL                                         !0, 'format'
         16        SEND_VAL_EX                                              'u'
         17        DO_FCALL                                      0  $9      
         18        ECHO                                                     $9
    7    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.21 ms | 1395 KiB | 15 Q