3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test() { $header = 'Foo'; var_dump(get_class($header), get_class_methods($header), method_exists($header, 'column')); $header->column(); } public function column() { echo 1; } } $obj = new Foo; $obj->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pfhWE
function name:  (null)
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pfhWE
function name:  test
number of ops:  17
compiled vars:  !0 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'Foo'
    8     1        INIT_FCALL                                               'var_dump'
          2        GET_CLASS                                        ~2      !0
          3        SEND_VAL                                                 ~2
          4        INIT_FCALL                                               'get_class_methods'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        INIT_FCALL                                               'method_exists'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 'column'
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
    9    14        INIT_METHOD_CALL                                         !0, 'column'
         15        DO_FCALL                                      0          
   10    16      > RETURN                                                   null

End of function test

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

End of function column

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.5 ms | 1396 KiB | 19 Q