3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [10, 20, 30, 40, 50]; extract( (fn($a, $b, ...$c) => get_defined_vars())(...$array) ); echo json_encode([$a, $b, $c]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TOgsk
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $a, !2 = $b, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'extract'
    8     2        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          3        INIT_DYNAMIC_CALL                                        ~5
          4        SEND_UNPACK                                              !0
          5        CHECK_UNDEF_ARGS                                         
          6        DO_FCALL                                      1  $6      
          7        SEND_VAL                                                 $6
    7     8        DO_ICALL                                                 
   11     9        INIT_FCALL                                               'json_encode'
         10        INIT_ARRAY                                       ~8      !1
         11        ADD_ARRAY_ELEMENT                                ~8      !2
         12        ADD_ARRAY_ELEMENT                                ~8      !3
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        ECHO                                                     $9
         16      > 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/TOgsk
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_VARIADIC                                    !2      
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $3      
          5      > RETURN                                                   $3
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.77 ms | 1002 KiB | 16 Q