3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(function() { $foo = new Foo; set_error_handler(function() use ($foo) {}); }); class Foo { public function __destruct() { var_dump($GLOBALS); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3oEK
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ob_start'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FX3oEK%3A3%240'
    6     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FX3oEK%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3oEK
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    5     3        INIT_FCALL                                               'set_error_handler'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FX3oEK%3A5%241'
          5        BIND_LEXICAL                                             ~4, !0
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
    6     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FX3oEK%3A3%240

Function %00%7Bclosure%7D%2Fin%2FX3oEK%3A5%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3oEK
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FX3oEK%3A5%241

Class Foo:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X3oEK
function name:  __destruct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_R                      global              ~0      'GLOBALS'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   11     4      > RETURN                                                   null

End of function __destruct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.1 ms | 1396 KiB | 19 Q