3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $headers = array("asdf"); public function test() { try { exit(1); } finally { $this->headers = []; } } } $foo = new foo(); var_dump($foo->headers); var_dump($foo->test()); var_dump($foo->headers);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Q7O8b
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~4      !0, 'headers'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   16     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'test'
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
   17    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_R                                      ~8      !0, 'headers'
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/Q7O8b
function name:  test
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > EXIT                                                     1
    8     1*       FAST_CALL                                                ->3
          2*       JMP                                                      ->6
    9     3*       ASSIGN_OBJ                                               'headers'
          4*       OP_DATA                                                  <array>
          5*       FAST_RET                                                 
   11     6*     > RETURN                                                   null

End of function test

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.73 ms | 1395 KiB | 15 Q