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(); } } var_dump((new class extends A { public function __construct() {} })->A()[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tUgTG
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        DECLARE_ANON_CLASS                               <unknown> 'a'
          2        NEW                                              $1      $0
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $1, 'A'
          5        DO_FCALL                                      0  $3      
          6        FETCH_DIM_R                                      ~4      $3, 1
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/tUgTG
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/tUgTG
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/tUgTG
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.

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

End of function __construct

End of class A@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.97 ms | 1396 KiB | 15 Q