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 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NiXZZ
function name:  (null)
number of ops:  16
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        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNiXZZ%3A6%240'
          3        SEND_VAL                                                 ~4
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
          7      > JMP                                                      ->12
    7     8  E > > CATCH                                       last         'Exception'
          9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
    8    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNiXZZ%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/NiXZZ
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%2FNiXZZ%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.29 ms | 1395 KiB | 17 Q