3v4l.org

run code in 300+ PHP versions simultaneously
;<?php class foo { public $headers = array("asdf"); public function test() { try { exit(1); } finally { echo "finally" . PHP_EOL; } } } $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/V5r4s
function name:  (null)
number of ops:  18
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3B'
   14     1        NEW                                              $1      'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~4      !0, 'headers'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'test'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   17    13        INIT_FCALL                                               'var_dump'
         14        FETCH_OBJ_R                                      ~8      !0, 'headers'
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

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

End of function test

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.55 ms | 1395 KiB | 15 Q