3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach((new ReflectionClass('DateTime'))->getConstants() as $name=>$format){ echo 'DateTime::'.$name.' -> '.(new DateTime(NULL,new DateTimeZone("UTC2")))->format($format).PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 24
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/AJCGI
function name:  (null)
number of ops:  26
compiled vars:  !0 = $format, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'DateTime'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $2, 'getConstants'
          4        DO_FCALL                                      0  $4      
          5      > FE_RESET_R                                       $5      $4, ->24
          6    > > FE_FETCH_R                                       ~6      $5, !0, ->24
          7    >   ASSIGN                                                   !1, ~6
    3     8        CONCAT                                           ~8      'DateTime%3A%3A', !1
          9        CONCAT                                           ~9      ~8, '+-%3E+'
         10        NEW                                              $10     'DateTime'
         11        SEND_VAL_EX                                              null
         12        NEW                                              $11     'DateTimeZone'
         13        SEND_VAL_EX                                              'UTC2'
         14        DO_FCALL                                      0          
         15        SEND_VAR_NO_REF_EX                                       $11
         16        DO_FCALL                                      0          
         17        INIT_METHOD_CALL                                         $10, 'format'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0  $14     
         20        CONCAT                                           ~15     ~9, $14
         21        CONCAT                                           ~16     ~15, '%0A'
         22        ECHO                                                     ~16
    2    23      > JMP                                                      ->6
         24    >   FE_FREE                                                  $5
    4    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.66 ms | 1394 KiB | 13 Q