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); var_dump($baz); } function hi(array $params) { list($meh, $hem) = array_values($params); list($key, $yek) = array_keys($params); var_dump($meh); var_dump($hem); var_dump($key); var_dump($yek); } $foo = foo(); hello($foo); hi($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GZKfJ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   34     3        INIT_FCALL                                               'hello'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   36     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/GZKfJ
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/GZKfJ
function name:  hello
number of ops:  11
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        DO_ICALL                                                 
   16     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
   17    10      > 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/GZKfJ
function name:  hi
number of ops:  30
compiled vars:  !0 = $params, !1 = $meh, !2 = $hem, !3 = $key, !4 = $yek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     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
   23     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
   25    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   26    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
   27    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
   28    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                                 
   29    29      > RETURN                                                   null

End of function hi

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.16 ms | 1394 KiB | 26 Q