3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { const match = 'match'; public $match; public function match() { return 'match'; } } $foo = new Foo(); $foo->match = 'match'; var_dump(Foo::match); var_dump($foo->match); var_dump($foo->match());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QLIOW
function name:  (null)
number of ops:  18
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'Foo'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   12     3        ASSIGN_OBJ                                                   !0, 'match'
          4        OP_DATA                                                      'match'
   14     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAL                                                     'match'
          7        DO_ICALL                                                     
   15     8        INIT_FCALL                                                   'var_dump'
          9        FETCH_OBJ_R                                          ~6      !0, 'match'
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                                     
   16    12        INIT_FCALL                                                   'var_dump'
         13        INIT_METHOD_CALL                                             !0, 'match'
         14        DO_FCALL                                          0  $8      
         15        SEND_VAR                                                     $8
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

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

End of function match

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.99 ms | 1972 KiB | 14 Q