3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testing { private $myProperty = "parent"; public function __set($name, $value) { if ($name === 'myProperty') { throw new Exception('bla!'); } } public function getParentProperty() { echo "property: {$this->myProperty}"; } } class ChildTesting extends Testing { private $myProperty = "child"; public function __construct() { $this->myProperty = 'bla'; } } $obj = new ChildTesting; $obj->getParentProperty();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVAde
function name:  (null)
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'ChildTesting'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        INIT_METHOD_CALL                                         !0, 'getParentProperty'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Testing:
Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVAde
function name:  __set
number of ops:  9
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_IDENTICAL                                             !0, 'myProperty'
          3      > JMPZ                                                     ~2, ->8
    8     4    >   NEW                                              $3      'Exception'
          5        SEND_VAL_EX                                              'bla%21'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
   10     8    > > RETURN                                                   null

End of function __set

Function getparentproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVAde
function name:  getParentProperty
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NOP                                                      
          1        FETCH_OBJ_R                                      ~0      'myProperty'
          2        FAST_CONCAT                                      ~1      'property%3A+', ~0
          3        ECHO                                                     ~1
   15     4      > RETURN                                                   null

End of function getparentproperty

End of class Testing.

Class ChildTesting:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVAde
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN_OBJ                                               'myProperty'
          1        OP_DATA                                                  'bla'
   22     2      > RETURN                                                   null

End of function __construct

Function __set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVAde
function name:  __set
number of ops:  9
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_IDENTICAL                                             !0, 'myProperty'
          3      > JMPZ                                                     ~2, ->8
    8     4    >   NEW                                              $3      'Exception'
          5        SEND_VAL_EX                                              'bla%21'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
   10     8    > > RETURN                                                   null

End of function __set

Function getparentproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gVAde
function name:  getParentProperty
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NOP                                                      
          1        FETCH_OBJ_R                                      ~0      'myProperty'
          2        FAST_CONCAT                                      ~1      'property%3A+', ~0
          3        ECHO                                                     ~1
   15     4      > RETURN                                                   null

End of function getparentproperty

End of class ChildTesting.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.32 ms | 1403 KiB | 13 Q