3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { return new DateTime(); } var_dump(f()); var_dump(f()->date); var_dump(f()->timezone_type); var_dump(f()->timezone);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uimNk
function name:  (null)
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'f'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
    8     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'f'
          7        DO_FCALL                                      0  $2      
          8        FETCH_OBJ_R                                      ~3      $2, 'date'
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'f'
         13        DO_FCALL                                      0  $5      
         14        FETCH_OBJ_R                                      ~6      $5, 'timezone_type'
         15        SEND_VAL                                                 ~6
         16        DO_ICALL                                                 
   10    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'f'
         19        DO_FCALL                                      0  $8      
         20        FETCH_OBJ_R                                      ~9      $8, 'timezone'
         21        SEND_VAL                                                 ~9
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uimNk
function name:  f
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'DateTime'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    5     3*     > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.13 ms | 1016 KiB | 18 Q