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; } } $calculator = 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/7ha2r
function name:  (null)
number of ops:  13
compiled vars:  !0 = $calculator, !1 = $returnValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'myClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   25     3        INIT_METHOD_CALL                                         !0, 'setValue'
          4        SEND_VAL_EX                                              3
          5        DO_FCALL                                      0  $5      
   26     6        INIT_METHOD_CALL                                         $5, 'doubleValue'
          7        DO_FCALL                                      0  $6      
   27     8        INIT_METHOD_CALL                                         $6, 'getValue'
          9        DO_FCALL                                      0  $7      
   25    10        ASSIGN                                                   !1, $7
   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/7ha2r
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/7ha2r
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/7ha2r
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:
148.38 ms | 1395 KiB | 13 Q