3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function __construct() { throw new Exception('thrown'); } public function A() { return array('a', 'b', 'c'); } public static function I() { return new A(); } } $instance = A::I(); $A = call_user_func_array('A::A', array()); print $A[1];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UGIZE
function name:  (null)
number of ops:  11
compiled vars:  !0 = $instance, !1 = $A
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'A', 'I'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   22     3        INIT_USER_CALL                                0          'call_user_func_array', 'A%3A%3AA'
          4        SEND_ARRAY                                               <array>
          5        CHECK_UNDEF_ARGS                                         
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
   23     8        FETCH_DIM_R                                      ~6      !1, 1
          9        ECHO                                                     ~6
         10      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/UGIZE
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'thrown'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    8     4*     > RETURN                                                   null

End of function __construct

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UGIZE
function name:  A
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   <array>
   13     1*     > RETURN                                                   null

End of function a

Function i:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UGIZE
function name:  I
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $0      'A'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   18     3*     > RETURN                                                   null

End of function i

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.07 ms | 1395 KiB | 13 Q