3v4l.org

run code in 300+ PHP versions simultaneously
<?php class class1 { protected $prop; public function __construct($prop) { $this->prop = $prop; } public function getThing($arg) { assert('$arg->isValid();'); $this->prop->method(); } } class class2 { public function method() { echo "here\n"; } } class class3 { public function isValid() { return false; } } $tmp = new class1(new class2()); $tmp->getThing(new class3());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cQNm
function name:  (null)
number of ops:  12
compiled vars:  !0 = $tmp
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  20     0  E >   NEW                                              $1      :19
         1        NEW                                              $2      :19
         2        DO_FCALL                                      0          
         3        SEND_VAR_NO_REF_EX                                       $2
         4        DO_FCALL                                      0          
         5        QM_ASSIGN                                                !0
  21     6        INIT_METHOD_CALL                                         !0, 'getThing'
         7        NEW                                              $6      :11
         8        DO_FCALL                                      0          
         9        SEND_VAR_NO_REF_EX                                       $6
        10        DO_FCALL                                      0          
        11      > RETURN                                                   1

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

End of function __construct

Function getthing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cQNm
function name:  getThing
number of ops:  9
compiled vars:  !0 = $arg
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   RECV                                             !0      
   7     1        ASSERT_CHECK                                             
         2        INIT_FCALL                                               'assert'
         3        SEND_VAL                                                 '%24arg-%3EisValid%28%29%3B'
         4        DO_ICALL                                                 
   8     5        FETCH_OBJ_R                                      ~2      'prop'
         6        INIT_METHOD_CALL                                         ~2, 'method'
         7        DO_FCALL                                      0          
   9     8      > RETURN                                                   null

End of function getthing

End of class class1.

Class class2:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cQNm
function name:  method
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  13     0  E >   ASSIGN_OBJ                                               'here%0A'
         1      > RETURN                                                   null

End of function method

End of class class2.

Class class3:
Function isvalid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cQNm
function name:  isValid
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  17     0  E > > RETURN                                                   <false>
         1*     > RETURN                                                   null

End of function isvalid

End of class class3.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
13.78 ms | 416 KiB | 7 Q