3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testClass { private $test; public function __construct($test) { $this->test = $test; } public function viewOthersTest($obj) { return $obj->test; } } $obj1 = new testClass(1); $obj2 = new testClass(2); var_dump($obj1->viewOthersTest($obj2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d25Ng
function name:  (null)
number of ops:  15
compiled vars:  !0 = $obj1, !1 = $obj2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $2      'testClass'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   19     4        NEW                                              $5      'testClass'
          5        SEND_VAL_EX                                              2
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   21     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'viewOthersTest'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function __construct

Function viewotherstest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d25Ng
function name:  viewOthersTest
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   14     1        FETCH_OBJ_R                                      ~1      !0, 'test'
          2      > RETURN                                                   ~1
   15     3*     > RETURN                                                   null

End of function viewotherstest

End of class testClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.27 ms | 1396 KiB | 15 Q