3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { protected $wat = 'aaaa'; public function a() { echo 'a(): ' . $this->wat . "\n"; } } class B extends A { protected $wat = 'bbbb'; public function b() { echo 'b(): ' . $this->wat . "\n"; } } $b = new B; $b->a(); $b->b();
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Yo1jd
function name:  (null)
number of ops:  11
compiled vars:  !0 = $b
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  13     1        NOP                                                      
         2        NOP                                                      
  23     3        NEW                                              $4      :-4
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $4
  24     6        INIT_METHOD_CALL                                         !0, 'a'
         7        DO_FCALL                                      0          
  25     8        INIT_METHOD_CALL                                         !0, 'b'
         9        DO_FCALL                                      0          
        10      > RETURN                                                   1

Class A:
Function a:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Yo1jd
function name:  a
number of ops:  5
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   FETCH_OBJ_R                                      $0      'wat'
         1        CONCAT                                           ~1      'a%28%29%3A+', $0
         2        CONCAT                                           ~2      ~1, '%0A'
         3        ECHO                                                     ~2
  10     4      > RETURN                                                   null

End of function a

End of class A.

Class B:
Function b:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Yo1jd
function name:  b
number of ops:  5
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  19     0  E >   FETCH_OBJ_R                                      $0      'wat'
         1        CONCAT                                           ~1      'b%28%29%3A+', $0
         2        CONCAT                                           ~2      ~1, '%0A'
         3        ECHO                                                     ~2
  20     4      > RETURN                                                   null

End of function b

Function a:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Yo1jd
function name:  a
number of ops:  5
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   FETCH_OBJ_R                                      $0      'wat'
         1        CONCAT                                           ~1      'a%28%29%3A+', $0
         2        CONCAT                                           ~2      ~1, '%0A'
         3        ECHO                                                     ~2
  10     4      > RETURN                                                   null

End of function a

End of class B.

Generated using Vulcan Logic Dumper, using php 7.2.0