3v4l.org

run code in 300+ PHP versions simultaneously
<?php $e = new Exception (); $stack = $e -> getTrace (); print_r($stack); $exclude = 'foo.php'; while (isset ($stack [0]) && ($exclude === substr ($stack [0] ['file'], -strlen($exclude)) || 'error_handler' === $stack [0] ['function'])) { array_shift ($stack); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 31
Branch analysis from position: 16
2 jumps found. (Code = 47) Position 1 = 26, Position 2 = 30
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 11
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 16, Position 2 = 31
Branch analysis from position: 16
Branch analysis from position: 31
Branch analysis from position: 30
Branch analysis from position: 31
filename:       /in/vEUaG
function name:  (null)
number of ops:  33
compiled vars:  !0 = $e, !1 = $stack, !2 = $exclude
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'Exception'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        INIT_METHOD_CALL                                         !0, 'getTrace'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
    6     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        ASSIGN                                                   !2, 'foo.php'
    9    10      > JMP                                                      ->14
   13    11    >   INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !1
         13        DO_ICALL                                                 
    9    14    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~11     !1, 0
         15      > JMPZ_EX                                          ~11     ~11, ->31
   10    16    >   INIT_FCALL                                               'substr'
         17        FETCH_DIM_R                                      ~12     !1, 0
         18        FETCH_DIM_R                                      ~13     ~12, 'file'
         19        SEND_VAL                                                 ~13
         20        STRLEN                                           ~14     !2
         21        MUL                                              ~15     ~14, -1
         22        SEND_VAL                                                 ~15
         23        DO_ICALL                                         $16     
         24        IS_IDENTICAL                                     ~17     !2, $16
         25      > JMPNZ_EX                                         ~17     ~17, ->30
   11    26    >   FETCH_DIM_R                                      ~18     !1, 0
         27        FETCH_DIM_R                                      ~19     ~18, 'function'
         28        IS_IDENTICAL                                     ~20     ~19, 'error_handler'
         29        BOOL                                             ~17     ~20
         30    >   BOOL                                             ~11     ~17
         31    > > JMPNZ                                                    ~11, ->11
   14    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.6 ms | 1396 KiB | 19 Q