3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { protected $exp=0; public function __construct($e=0) { $this->exp=(int)$e; } public function setExp($e) { $this->exp=(int)$e; } public function __toString() { return $this->exp; } } $one = new User(); $two = new User(); $one->setExp(100); $two->setExp(200); print $one + $two;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vXCst
function name:  (null)
number of ops:  16
compiled vars:  !0 = $one, !1 = $two
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'user'
   22     1        NEW                                              $2      'User'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   23     4        NEW                                              $5      'User'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   25     7        INIT_METHOD_CALL                                         !0, 'setExp'
          8        SEND_VAL_EX                                              100
          9        DO_FCALL                                      0          
   26    10        INIT_METHOD_CALL                                         !1, 'setExp'
         11        SEND_VAL_EX                                              200
         12        DO_FCALL                                      0          
   28    13        ADD                                              ~10     !0, !1
         14        ECHO                                                     ~10
         15      > RETURN                                                   1

Class User:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vXCst
function name:  __construct
number of ops:  5
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      0
    8     1        CAST                                          4  ~2      !0
          2        ASSIGN_OBJ                                               'exp'
          3        OP_DATA                                                  ~2
    9     4      > RETURN                                                   null

End of function __construct

Function setexp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vXCst
function name:  setExp
number of ops:  5
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        CAST                                          4  ~2      !0
          2        ASSIGN_OBJ                                               'exp'
          3        OP_DATA                                                  ~2
   14     4      > RETURN                                                   null

End of function setexp

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

End of function __tostring

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.92 ms | 1399 KiB | 13 Q