3v4l.org

run code in 300+ PHP versions simultaneously
<?php function errorHandler() { return false; } function crash() { $stuff = array('aaa', 'bbb'); foreach ($stuff as $thing) { $thing[(object)array()] = 'w'; } print_r($stuff); if ($stuff[0] == 'aaa') { die(0); } else { die(1); } }; set_error_handler('errorHandler', E_WARNING); crash();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pIMSh
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'errorHandler'
          2        SEND_VAL                                                 2
          3        DO_ICALL                                                 
   23     4        INIT_FCALL                                               'crash'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function errorhandler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pIMSh
function name:  errorHandler
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   <false>
    6     1*     > RETURN                                                   null

End of function errorhandler

Function crash:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 7
filename:       /in/pIMSh
function name:  crash
number of ops:  18
compiled vars:  !0 = $stuff, !1 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $3      !0, ->7
          2    > > FE_FETCH_R                                               $3, !1, ->7
   12     3    >   CAST                                          8  ~4      <array>
          4        ASSIGN_DIM                                               !1, ~4
          5        OP_DATA                                                  'w'
   11     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $3
   14     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   15    11        FETCH_DIM_R                                      ~7      !0, 0
         12        IS_EQUAL                                                 ~7, 'aaa'
         13      > JMPZ                                                     ~8, ->16
   16    14    > > EXIT                                                     0
         15*       JMP                                                      ->17
   18    16    > > EXIT                                                     1
   20    17*     > RETURN                                                   null

End of function crash

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.32 ms | 1403 KiB | 18 Q