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) = $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/Q4Xti
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   28     3        INIT_FCALL                                               'hello'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   30     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/Q4Xti
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/Q4Xti
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/Q4Xti
function name:  hi
number of ops:  12
compiled vars:  !0 = $params, !1 = $meh, !2 = $hem
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        QM_ASSIGN                                        ~3      !0
          2        FETCH_LIST_R                                     $4      ~3, 0
          3        ASSIGN                                                   !1, $4
          4        FETCH_LIST_R                                     $6      ~3, 1
          5        ASSIGN                                                   !2, $6
          6        FREE                                                     ~3
   22     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   23    11      > RETURN                                                   null

End of function hi

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.95 ms | 1403 KiB | 22 Q