3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Logger { public function __construct() { register_shutdown_function(function () { // make regular flush before other shutdown functions, which allows session data collection and so on $this->flush(); // make sure log entries written by shutdown functions are also flushed // ensure "flush()" is called last when there are multiple shutdown functions register_shutdown_function([$this, 'flush'], true); }); } public function flush($final = false) { return 1; } } for ($i = 0; $i < 200; $i++) { $a = new Logger(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 2
Branch analysis from position: 8
Branch analysis from position: 2
filename:       /in/KC8d3
function name:  (null)
number of ops:  9
compiled vars:  !0 = $i, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->6
   20     2    >   NEW                                              $3      'Logger'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   19     5        PRE_INC                                                  !0
          6    >   IS_SMALLER                                               !0, 200
          7      > JMPNZ                                                    ~7, ->2
   21     8    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FKC8d3%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KC8d3
function name:  {closure}
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_THIS                                       $0      
          1        INIT_METHOD_CALL                                         $0, 'flush'
          2        DO_FCALL                                      0          
   10     3        INIT_FCALL                                               'register_shutdown_function'
          4        FETCH_THIS                                       ~2      
          5        INIT_ARRAY                                       ~3      ~2
          6        ADD_ARRAY_ELEMENT                                ~3      'flush'
          7        SEND_VAL                                                 ~3
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                                 
   11    10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FKC8d3%3A5%240

Class Logger:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KC8d3
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKC8d3%3A5%240'
   11     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function __construct

Function flush:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KC8d3
function name:  flush
number of ops:  3
compiled vars:  !0 = $final
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV_INIT                                        !0      <false>
   15     1      > RETURN                                                   1
   16     2*     > RETURN                                                   null

End of function flush

End of class Logger.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.43 ms | 1400 KiB | 15 Q