3v4l.org

run code in 300+ PHP versions simultaneously
<?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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yo1jd
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'a'
          4        DO_FCALL                                      0          
   25     5        INIT_METHOD_CALL                                         !0, 'b'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class A:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) 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
1 jumps found. (Code = 62) 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
1 jumps found. (Code = 62) 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 8.0.0


preferences:
147.09 ms | 1386 KiB | 13 Q