3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $a = $b = 1; var_dump(get_defined_vars()); list($a, $b) = array(); var_dump($a, $b); var_dump(get_defined_vars()); } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/puEv9
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/puEv9
function name:  foo
number of ops:  21
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~2      !1, 1
          1        ASSIGN                                                   !0, ~2
    4     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'get_defined_vars'
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                                 
    5     7        FETCH_LIST_R                                     $6      <array>, 0
          8        ASSIGN                                                   !0, $6
          9        FETCH_LIST_R                                     $8      <array>, 1
         10        ASSIGN                                                   !1, $8
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'get_defined_vars'
         17        DO_ICALL                                         $11     
         18        SEND_VAR                                                 $11
         19        DO_ICALL                                                 
    8    20      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.57 ms | 1402 KiB | 18 Q