3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = ['a','b']; try { $y = @array_map(function($x){ throw new \Exception(); }, $x); } catch (\Exception $e){var_dump($e);} var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9310V
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x, !1 = $y, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        BEGIN_SILENCE                                    ~4      
          2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9310V%3A6%240'
          4        SEND_VAL                                                 ~5
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        END_SILENCE                                              ~4
          8        ASSIGN                                                   !1, $6
          9      > JMP                                                      ->14
    7    10  E > > CATCH                                       last         'Exception'
         11    >   INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
    8    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9310V%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/9310V
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        NEW                                              $1      'Exception'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $1
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9310V%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.7 ms | 1387 KiB | 17 Q