3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { private $obj; function __construct(object $obj) { $this->obj = $obj; } function getObj(): object { return $this->object; } } $x = new X(new stdClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ffhIc
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'X'
          1        NEW                                              $2      'stdClass'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
          6      > RETURN                                                   1

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

End of function __construct

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

End of function getobj

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.71 ms | 1398 KiB | 13 Q