3v4l.org

run code in 300+ PHP versions simultaneously
<?php $closure = function () use (&$person) { $person['name'] = 'Timmy'; $person['surname'] = 'Back'; return $person; }; $person = ['test']; var_dump($closure());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LcNAP
function name:  (null)
number of ops:  10
compiled vars:  !0 = $closure, !1 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        BIND_LEXICAL                                             ~2, !1
          2        ASSIGN                                                   !0, ~2
   11     3        ASSIGN                                                   !1, <array>
   12     4        INIT_FCALL                                               'var_dump'
          5        INIT_DYNAMIC_CALL                                        !0
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
          9      > 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/LcNAP
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_STATIC                                              !0
    5     1        ASSIGN_DIM                                               !0, 'name'
          2        OP_DATA                                                  'Timmy'
    6     3        ASSIGN_DIM                                               !0, 'surname'
          4        OP_DATA                                                  'Back'
    8     5      > RETURN                                                   !0
    9     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.42 ms | 1013 KiB | 14 Q