3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { protected $_foo = 'foo'; public function isMatch() { var_dump($this->_foo); var_dump(self::$_foo); } } class Bar extends Foo { protected $_foo = 'bar'; } $a = new Bar(); var_dump($a->isMatch());
based on VntMm
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/58PpR
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  12     1        NOP                                                      
         2        NOP                                                      
  16     3        NEW                                              $4      :-4
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $4
  17     6        INIT_FCALL                                               'var_dump'
         7        INIT_METHOD_CALL                                         !0, 'isMatch'
         8        DO_FCALL                                      0  $7      
         9        SEND_VAR                                                 $7
        10        DO_ICALL                                                 
        11      > RETURN                                                   1

Class Foo:
Function ismatch:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/58PpR
function name:  isMatch
number of ops:  10
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   INIT_FCALL                                               'var_dump'
         1        FETCH_OBJ_R                                      $0      '_foo'
         2        SEND_VAR                                                 $0
         3        DO_ICALL                                                 
   8     4        INIT_FCALL                                               'var_dump'
         5        FETCH_CLASS                                 513  :2      
         6        FETCH_R                      static member       $3      '_foo'
         7        SEND_VAR                                                 $3
         8        DO_ICALL                                                 
   9     9      > RETURN                                                   null

End of function ismatch

End of class Foo.

Class Bar:
Function ismatch:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/58PpR
function name:  isMatch
number of ops:  10
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   7     0  E >   INIT_FCALL                                               'var_dump'
         1        FETCH_OBJ_R                                      $0      '_foo'
         2        SEND_VAR                                                 $0
         3        DO_ICALL                                                 
   8     4        INIT_FCALL                                               'var_dump'
         5        FETCH_CLASS                                 513  :2      
         6        FETCH_R                      static member       $3      '_foo'
         7        SEND_VAR                                                 $3
         8        DO_ICALL                                                 
   9     9      > RETURN                                                   null

End of function ismatch

End of class Bar.

Generated using Vulcan Logic Dumper, using php 7.3.0