3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ private $var; function setMe($value){ $this->var = $value; } } class More extends Test{ public $var; } $oTest = new Test; $oMore = new More; echo $oTest->setMe('foo'); echo $oMore->setMe('foo'); echo $oMore->var; echo $oTest->var;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rNFs9
function name:  (null)
number of ops:  19
compiled vars:  !0 = $oTest, !1 = $oMore
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        NEW                                              $5      'More'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   16     6        INIT_METHOD_CALL                                         !0, 'setMe'
          7        SEND_VAL_EX                                              'foo'
          8        DO_FCALL                                      0  $8      
          9        ECHO                                                     $8
   18    10        INIT_METHOD_CALL                                         !1, 'setMe'
         11        SEND_VAL_EX                                              'foo'
         12        DO_FCALL                                      0  $9      
         13        ECHO                                                     $9
   20    14        FETCH_OBJ_R                                      ~10     !1, 'var'
         15        ECHO                                                     ~10
   22    16        FETCH_OBJ_R                                      ~11     !0, 'var'
         17        ECHO                                                     ~11
         18      > RETURN                                                   1

Class Test:
Function setme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rNFs9
function name:  setMe
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               'var'
          2        OP_DATA                                                  !0
    6     3      > RETURN                                                   null

End of function setme

End of class Test.

Class More:
Function setme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rNFs9
function name:  setMe
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               'var'
          2        OP_DATA                                                  !0
    6     3      > RETURN                                                   null

End of function setme

End of class More.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.32 ms | 1395 KiB | 13 Q