3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function register() { register_shutdown_function(function () { // make sure "flush()" is called last when there are multiple shutdown functions register_shutdown_function([$this, 'flush'], true); }); } public function flush() { echo "flush"; } } $a = new Test; $a->register();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4KB60
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'register'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F4KB60%3A7%240

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

End of function register

Function flush:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4KB60
function name:  flush
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'flush'
   16     1      > RETURN                                                   null

End of function flush

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163 ms | 1396 KiB | 15 Q