3v4l.org

run code in 300+ PHP versions simultaneously
<?php //require_once __DIR__ . '/autoload.php'; set_exception_handler(function (\Throwable $e) { new Aaalaksjas(); }); function foo(string $key): ?string { throw new \Exception('asdas'); } $validKeys = array_keys( array_filter( [ 'a' => 'b', ], fn (string $signature, string $key) => true, ARRAY_FILTER_USE_BOTH, ), ); $result = array_filter( array_combine( $validKeys, array_map(foo(...), $validKeys), ), );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZoXRO
function name:  (null)
number of ops:  29
compiled vars:  !0 = $validKeys, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
    8     2        SEND_VAL                                                 ~2
    6     3        DO_ICALL                                                 
   15     4        INIT_FCALL                                               'array_keys'
   16     5        INIT_FCALL                                               'array_filter'
   18     6        SEND_VAL                                                 <array>
   20     7        DECLARE_LAMBDA_FUNCTION                          ~4      [1]
          8        SEND_VAL                                                 ~4
   21     9        SEND_VAL                                                 1
   16    10        DO_ICALL                                         $5      
   21    11        SEND_VAR                                                 $5
   15    12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !0, $6
   25    14        INIT_FCALL                                               'array_filter'
   26    15        INIT_FCALL                                               'array_combine'
   27    16        SEND_VAR                                                 !0
   28    17        INIT_FCALL                                               'array_map'
         18        INIT_FCALL                                               'foo'
         19        ZEND_CALLABLE_CONVERT                            ~8      
         20        SEND_VAL                                                 ~8
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
   26    24        DO_ICALL                                         $10     
   28    25        SEND_VAR                                                 $10
   25    26        DO_ICALL                                         $11     
         27        ASSIGN                                                   !1, $11
   30    28      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZoXRO
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        NEW                                              $1      'Aaalaksjas'
          2        DO_FCALL                                      0          
          3        FREE                                                     $1
    8     4      > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZoXRO
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $signature, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   <true>
          3*     > RETURN                                                   null

End of Dynamic Function 1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/ZoXRO
function name:  foo
number of ops:  7
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'asdas'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   13     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.2 ms | 1022 KiB | 19 Q