3v4l.org

run code in 300+ PHP versions simultaneously
<?php class p { protected $a = 'aaa'; private $b = 'bbb'; public function pub($obj = null) { //$obj = new $this; return $obj->abc(); } protected function abc() { return $this->a; } private function asd() { return $this->b; } public function __set($kk, $v) { $this->$kk = $v; } } $o = new p; $o->a = '1'; $o->b = 2; echo $o->pub($o);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TCsq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   NEW                                              $1      'p'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   32     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  '1'
   33     5        ASSIGN_OBJ                                               !0, 'b'
          6        OP_DATA                                                  2
   37     7        INIT_METHOD_CALL                                         !0, 'pub'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $6      
         10        ECHO                                                     $6
         11      > RETURN                                                   1

Class p:
Function pub:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TCsq
function name:  pub
number of ops:  5
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      null
   14     1        INIT_METHOD_CALL                                         !0, 'abc'
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
   15     4*     > RETURN                                                   null

End of function pub

Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TCsq
function name:  abc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function abc

Function asd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TCsq
function name:  asd
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_OBJ_R                                      ~0      'b'
          1      > RETURN                                                   ~0
   23     2*     > RETURN                                                   null

End of function asd

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4TCsq
function name:  __set
number of ops:  5
compiled vars:  !0 = $kk, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   26     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
   27     4      > RETURN                                                   null

End of function __set

End of class p.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.4 ms | 1399 KiB | 13 Q