3v4l.org

run code in 300+ PHP versions simultaneously
<?php (function () { foreach ([true, 42] as $v) { ${$v} = $v; } unset($v); var_dump(get_defined_vars()); var_dump(compact(true, 42)); var_dump(compact((string)true, (string)42)); })();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5uQcK
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~0      [0]
   11     1        INIT_DYNAMIC_CALL                                        ~0
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 5
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/5uQcK
function name:  {closure}
number of ops:  29
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > FE_RESET_R                                       $1      <array>, ->5
          1    > > FE_FETCH_R                                               $1, !0, ->5
    5     2    >   FETCH_W                      local               $2      !0
          3        ASSIGN                                                   $2, !0
    4     4      > JMP                                                      ->1
          5    >   FE_FREE                                                  $1
    7     6        UNSET_CV                                                 !0
    8     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'get_defined_vars'
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'compact'
         14        SEND_VAL                                                 <true>
         15        SEND_VAL                                                 42
         16        DO_ICALL                                         $6      
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'compact'
         21        CAST                                          6  ~8      <true>
         22        SEND_VAL                                                 ~8
         23        CAST                                          6  ~9      42
         24        SEND_VAL                                                 ~9
         25        DO_ICALL                                         $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                                 
   11    28      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.38 ms | 1003 KiB | 16 Q