3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person{ public $sName; public $oReturn; function __construct($sName) { $this->sName = $sName; $this->oReturn = new stdClass; $this->oReturn->status = 200; $this->oReturn->value = "Personname"; } public function something($oData){ //Declaration $this->oReturn->value = $oData->newName; //Main //Return return $this->oReturn; } } $Person = new Person('Walter'); $data = new stdClass(); $data->newName = 'Changed Name'; var_dump($Person->something($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2YWQn
function name:  (null)
number of ops:  16
compiled vars:  !0 = $Person, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'Person'
          1        SEND_VAL_EX                                              'Walter'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   25     4        NEW                                              $5      'stdClass'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   26     7        ASSIGN_OBJ                                               !1, 'newName'
          8        OP_DATA                                                  'Changed+Name'
   28     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'something'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0  $9      
         13        SEND_VAR                                                 $9
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Person:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2YWQn
function name:  __construct
number of ops:  14
compiled vars:  !0 = $sName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'sName'
          2        OP_DATA                                                  !0
    8     3        NEW                                              $3      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               'oReturn'
          6        OP_DATA                                                  $3
    9     7        FETCH_OBJ_W                                      $5      'oReturn'
          8        ASSIGN_OBJ                                               $5, 'status'
          9        OP_DATA                                                  200
   10    10        FETCH_OBJ_W                                      $7      'oReturn'
         11        ASSIGN_OBJ                                               $7, 'value'
         12        OP_DATA                                                  'Personname'
   11    13      > RETURN                                                   null

End of function __construct

Function something:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2YWQn
function name:  something
number of ops:  8
compiled vars:  !0 = $oData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        FETCH_OBJ_R                                      ~3      !0, 'newName'
          2        FETCH_OBJ_W                                      $1      'oReturn'
          3        ASSIGN_OBJ                                               $1, 'value'
          4        OP_DATA                                                  ~3
   19     5        FETCH_OBJ_R                                      ~4      'oReturn'
          6      > RETURN                                                   ~4
   20     7*     > RETURN                                                   null

End of function something

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.36 ms | 1400 KiB | 15 Q