3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myInstance = new MyClass('ciao'); $res = $myInstance->doSomething(); print($res); print("\n"); print($myInstance->getName()); class MyClass { private $_name; public function setName($name) { $this->_name = $name; } public function getName() { return $this->_name; } public function __construct($name) { $this->_name = $name; } public function doSomething($value) { $value = $value . '_MODIFIED'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gNND
function name:  (null)
number of ops:  13
compiled vars:  !0 = $myInstance, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'MyClass'
          1        SEND_VAL_EX                                              'ciao'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        INIT_METHOD_CALL                                         !0, 'doSomething'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    7     7        ECHO                                                     !1
    8     8        ECHO                                                     '%0A'
    9     9        INIT_METHOD_CALL                                         !0, 'getName'
         10        DO_FCALL                                      0  $7      
         11        ECHO                                                     $7
   29    12      > RETURN                                                   1

Class MyClass:
Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gNND
function name:  setName
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        ASSIGN_OBJ                                               '_name'
          2        OP_DATA                                                  !0
   16     3      > RETURN                                                   null

End of function setname

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

End of function getname

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gNND
function name:  __construct
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   23     1        ASSIGN_OBJ                                               '_name'
          2        OP_DATA                                                  !0
   24     3      > RETURN                                                   null

End of function __construct

Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gNND
function name:  doSomething
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        CONCAT                                           ~1      !0, '_MODIFIED'
          2        ASSIGN                                                   !0, ~1
   28     3      > RETURN                                                   null

End of function dosomething

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.05 ms | 1399 KiB | 13 Q