3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { protected $value; function setValue($value) : self { $this->value = $value; } function doubleValue() : self { $this->value*=2; } function getValue() : self { return $this->value; } } $caculator = new myClass(); $returnValue = $calculator->setValue(3) ->doubleValue() ->getValue(); echo $returnValue;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIZl9
function name:  (null)
number of ops:  13
compiled vars:  !0 = $caculator, !1 = $returnValue, !2 = $calculator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $3      'myClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   25     3        INIT_METHOD_CALL                                         !2, 'setValue'
          4        SEND_VAL_EX                                              3
          5        DO_FCALL                                      0  $6      
   26     6        INIT_METHOD_CALL                                         $6, 'doubleValue'
          7        DO_FCALL                                      0  $7      
   27     8        INIT_METHOD_CALL                                         $7, 'getValue'
          9        DO_FCALL                                      0  $8      
   25    10        ASSIGN                                                   !1, $8
   29    11        ECHO                                                     !1
         12      > RETURN                                                   1

Class myClass:
Function setvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIZl9
function name:  setValue
number of ops:  5
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
   10     3        VERIFY_RETURN_TYPE                                       
          4      > RETURN                                                   null

End of function setvalue

Function doublevalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIZl9
function name:  doubleValue
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN_OBJ_OP                                 3          'value'
          1        OP_DATA                                                  2
   15     2        VERIFY_RETURN_TYPE                                       
          3      > RETURN                                                   null

End of function doublevalue

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

End of function getvalue

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.59 ms | 1395 KiB | 13 Q