3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyObj { public $member = 'sad'; public function setMember($emotion) { $this->member = $emotion; return $this; } } $obj = (new MyObj())->setMember('happy'); var_dump($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TAHkU
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'MyObj'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $1, 'setMember'
          3        SEND_VAL_EX                                              'happy'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !0, $3
   14     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class MyObj:
Function setmember:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TAHkU
function name:  setMember
number of ops:  6
compiled vars:  !0 = $emotion
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'member'
          2        OP_DATA                                                  !0
    8     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
    9     5*     > RETURN                                                   null

End of function setmember

End of class MyObj.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.91 ms | 1395 KiB | 15 Q