3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $bar = 'herro'; $baz = 'strrev'; return compact('bar', 'baz'); } function hello(array $params) { extract($params); var_dump($bar, $baz); // yes, this is happening... } function hi(array $params) { list($meh, $hem) = array_values($params); list($key, $yek) = array_keys($params); var_dump($meh, $hem); } $foo = foo(); hello($foo); hi($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ooj18
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   30     3        INIT_FCALL                                               'hello'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   32     6        INIT_FCALL                                               'hi'
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ooj18
function name:  foo
number of ops:  8
compiled vars:  !0 = $bar, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'herro'
    6     1        ASSIGN                                                   !1, 'strrev'
    8     2        INIT_FCALL                                               'compact'
          3        SEND_VAL                                                 'bar'
          4        SEND_VAL                                                 'baz'
          5        DO_ICALL                                         $4      
          6      > RETURN                                                   $4
    9     7*     > RETURN                                                   null

End of function foo

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ooj18
function name:  hello
number of ops:  9
compiled vars:  !0 = $params, !1 = $bar, !2 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'extract'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   15     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                                 
   16     8      > RETURN                                                   null

End of function hello

Function hi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ooj18
function name:  hi
number of ops:  22
compiled vars:  !0 = $params, !1 = $meh, !2 = $hem, !3 = $key, !4 = $yek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        INIT_FCALL                                               'array_values'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        FETCH_LIST_R                                     $6      $5, 0
          5        ASSIGN                                                   !1, $6
          6        FETCH_LIST_R                                     $8      $5, 1
          7        ASSIGN                                                   !2, $8
          8        FREE                                                     $5
   22     9        INIT_FCALL                                               'array_keys'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $10     
         12        FETCH_LIST_R                                     $11     $10, 0
         13        ASSIGN                                                   !3, $11
         14        FETCH_LIST_R                                     $13     $10, 1
         15        ASSIGN                                                   !4, $13
         16        FREE                                                     $10
   24    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   25    21      > RETURN                                                   null

End of function hi

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.33 ms | 1403 KiB | 26 Q