3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = (object) array(); $callback = function & () use (&$a) { return $a; }; $b = &$callback(); $c = &call_user_func($callback); var_dump($b === $a); var_dump($c === $a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/msaIZ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $callback, !2 = $b, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~4      <array>
          1        ASSIGN                                                   !0, ~4
    5     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FmsaIZ%3A5%240'
          3        BIND_LEXICAL                                             ~6, !0
          4        ASSIGN                                                   !1, ~6
    9     5        INIT_DYNAMIC_CALL                                        !1
          6        DO_FCALL                                      0  $8      
          7        ASSIGN_REF                                               !2, $8
   10     8        INIT_USER_CALL                                0          'call_user_func', !1
          9        DO_FCALL                                      0  $10     
         10        ASSIGN_REF                                               !3, $10
   12    11        INIT_FCALL                                               'var_dump'
         12        IS_IDENTICAL                                     ~12     !2, !0
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                                 
   13    15        INIT_FCALL                                               'var_dump'
         16        IS_IDENTICAL                                     ~14     !3, !0
         17        SEND_VAL                                                 ~14
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FmsaIZ%3A5%240:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/msaIZ
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    6     1      > RETURN_BY_REF                                            !0
    7     2*     > RETURN_BY_REF                                            null

End of function %00%7Bclosure%7D%2Fin%2FmsaIZ%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.32 ms | 1395 KiB | 15 Q