3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ function __construct(){ register_shutdown_function(array(__CLASS__, 'handle_shutdown')); echo "X\n"; while(1){ $t[]=new B(); } // echo "Y\n"; } static public function handle_shutdown(){ echo "B\n"; $b=new B(); $b=null; } } class B{ } $a=new A(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rtNlK
function name:  (null)
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/rtNlK
function name:  __construct
number of ops:  11
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                                 
    6     3        ECHO                                                     'X%0A'
    7     4      > JMP                                                      ->9
    8     5    >   NEW                                              $3      'B'
          6        DO_FCALL                                      0          
          7        ASSIGN_DIM                                               !0
          8        OP_DATA                                                  $3
    7     9    > > JMPNZ                                                    1, ->5
   11    10    > > RETURN                                                   null

End of function __construct

Function handle_shutdown:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rtNlK
function name:  handle_shutdown
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'B%0A'
   14     1        NEW                                              $1      'B'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        ASSIGN                                                   !0, null
   16     5      > RETURN                                                   null

End of function handle_shutdown

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.75 ms | 1396 KiB | 15 Q