3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() {} $r = new ReflectionFunction("f"); var_dump($r->getFileName()); var_dump($r->getStartLine()); $r = new ReflectionFunction("substr"); var_dump($r->getFileName()); var_dump($r->getStartLine());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GTLtn
function name:  (null)
number of ops:  29
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ReflectionFunction'
          1        SEND_VAL_EX                                              'f'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getFileName'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'getStartLine'
         11        DO_FCALL                                      0  $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
    7    14        NEW                                              $8      'ReflectionFunction'
         15        SEND_VAL_EX                                              'substr'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !0, $8
    8    18        INIT_FCALL                                               'var_dump'
         19        INIT_METHOD_CALL                                         !0, 'getFileName'
         20        DO_FCALL                                      0  $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'var_dump'
         24        INIT_METHOD_CALL                                         !0, 'getStartLine'
         25        DO_FCALL                                      0  $13     
         26        SEND_VAR                                                 $13
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

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

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.71 ms | 1001 KiB | 14 Q