3v4l.org

run code in 500+ PHP versions simultaneously
<?php class myclass{ public $param; public $param2 = 'Dramatic'; public function __cunstract(){ $this->param = $this->myfunc(); } public function myfunc() { return 'test'; } public function myfunc2(){ return $this->param; } } $obj = new myclass; echo $obj->myfunc2() . PHP_EOL; echo $obj->param2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5DeZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $1      'myclass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   22     3        INIT_METHOD_CALL                                             !0, 'myfunc2'
          4        DO_FCALL                                          0  $4      
          5        CONCAT                                               ~5      $4, '%0A'
          6        ECHO                                                         ~5
   23     7        FETCH_OBJ_R                                          ~6      !0, 'param2'
          8        ECHO                                                         ~6
   24     9      > RETURN                                                       1

Class myclass:
Function __cunstract:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5DeZ
function name:  __cunstract
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_METHOD_CALL                                             'myfunc'
          1        DO_FCALL                                          0  $1      
          2        ASSIGN_OBJ                                                   'param'
          3        OP_DATA                                                      $1
   10     4      > RETURN                                                       null

End of function __cunstract

Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c5DeZ
function name:  myfunc
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                       'test'
   14     1*     > RETURN                                                       null

End of function myfunc

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

End of function myfunc2

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
143.97 ms | 2306 KiB | 13 Q