3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($dt) { echo $dt->format('Y-m-d H:i:s'), "\n"; } f(new DateTimeImmutable('Monday next week 13:00')); f(new DateTimeImmutable('Friday next week 18:00')); f(new DateTimeImmutable());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TpSP8
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'f'
          1        NEW                                              $0      'DateTimeImmutable'
          2        SEND_VAL_EX                                              'Monday+next+week+13%3A00'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        DO_FCALL                                      0          
    6     6        INIT_FCALL                                               'f'
          7        NEW                                              $3      'DateTimeImmutable'
          8        SEND_VAL_EX                                              'Friday+next+week+18%3A00'
          9        DO_FCALL                                      0          
         10        SEND_VAR                                                 $3
         11        DO_FCALL                                      0          
    7    12        INIT_FCALL                                               'f'
         13        NEW                                              $6      'DateTimeImmutable'
         14        DO_FCALL                                      0          
         15        SEND_VAR                                                 $6
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TpSP8
function name:  f
number of ops:  7
compiled vars:  !0 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        INIT_METHOD_CALL                                         !0, 'format'
          2        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As'
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
          5        ECHO                                                     '%0A'
          6      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.61 ms | 1398 KiB | 16 Q