3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $a= 'a'; protected $b = 'b'; private $c = 'c'; function D() { echo $this->a; echo $this->b; echo $this->c; } } class TestCp extends Test { protected $b = 'e'; function D() { echo $this->a; echo $this->b; echo $this->c; } } $obj = new TestCp(); echo $obj->a; echo $obj->b; echo $obj->c; $obj->D();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DAZdf
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'TestCp'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   30     3        FETCH_OBJ_R                                      ~4      !0, 'a'
          4        ECHO                                                     ~4
   31     5        FETCH_OBJ_R                                      ~5      !0, 'b'
          6        ECHO                                                     ~5
   32     7        FETCH_OBJ_R                                      ~6      !0, 'c'
          8        ECHO                                                     ~6
   33     9        INIT_METHOD_CALL                                         !0, 'D'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Test:
Function d:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DAZdf
function name:  D
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ECHO                                                     ~0
   11     2        FETCH_OBJ_R                                      ~1      'b'
          3        ECHO                                                     ~1
   12     4        FETCH_OBJ_R                                      ~2      'c'
          5        ECHO                                                     ~2
   13     6      > RETURN                                                   null

End of function d

End of class Test.

Class TestCp:
Function d:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DAZdf
function name:  D
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ECHO                                                     ~0
   23     2        FETCH_OBJ_R                                      ~1      'b'
          3        ECHO                                                     ~1
   24     4        FETCH_OBJ_R                                      ~2      'c'
          5        ECHO                                                     ~2
   25     6      > RETURN                                                   null

End of function d

End of class TestCp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.98 ms | 1395 KiB | 13 Q