3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = null; $b = 'test'; $c = null; $test1 = function() use (&$a, &$b, &$c) { $value = 1; $a = &$value; $b = &$value; $c = array( 'c' => &$value, ); }; $test1(); echo 'a: '; var_dump($a); echo 'b: '; var_dump($b); echo 'c: '; var_dump($c); exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 61) Position 1 = -2
filename:       /in/uHaGq
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $test1
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, null
    3     1        ASSIGN                                                       !1, 'test'
    4     2        ASSIGN                                                       !2, null
    6     3        DECLARE_LAMBDA_FUNCTION                              ~7      [0]
          4        BIND_LEXICAL                                                 ~7, !0
          5        BIND_LEXICAL                                                 ~7, !1
          6        BIND_LEXICAL                                                 ~7, !2
          7        ASSIGN                                                       !3, ~7
   19     8        INIT_DYNAMIC_CALL                                            !3
          9        DO_FCALL                                          0          
   21    10        ECHO                                                         'a%3A+'
   22    11        INIT_FCALL                                                   'var_dump'
         12        SEND_VAR                                                     !0
         13        DO_ICALL                                                     
   23    14        ECHO                                                         'b%3A+'
   24    15        INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !1
         17        DO_ICALL                                                     
   25    18        ECHO                                                         'c%3A+'
   26    19        INIT_FCALL                                                   'var_dump'
         20        SEND_VAR                                                     !2
         21        DO_ICALL                                                     
   27    22      > INIT_FCALL                                                   'exit'
         23*       DO_ICALL                                                     
   28    24*     > 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/uHaGq
function name:  {closure:/in/uHaGq:6}
number of ops:  9
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   BIND_STATIC                                                  !0
          1        BIND_STATIC                                                  !1
          2        BIND_STATIC                                                  !2
    8     3        ASSIGN                                                       !3, 1
   10     4        ASSIGN_REF                                                   !0, !3
   12     5        ASSIGN_REF                                                   !1, !3
   15     6        INIT_ARRAY                                           ~7      !3, 'c'
   14     7        ASSIGN                                                       !2, ~7
   17     8      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.95 ms | 479 KiB | 9 Q