5 function R(inout
$S) {} // not a constructor because of the namespace
16 function __construct() {}
17 function Cls(inout
$foo) {} // not a constructor because of __construct
21 function inout(inout
$x) {}
25 const int foo
= Cls
::inout
;
29 function T(inout
$x) {}
37 private function foo(inout
$x) {}
38 private function bar() {}
42 private function foo($x) {}
43 private function bar(inout
$y) {}
46 class PrivGParent
extends PrivGGParent
{
50 class PrivParent
extends PrivGParent
{
51 private function foo(inout
$x) {}
52 private function bar($y) {}
55 class PrivChild
extends PrivParent
{
56 private function foo() {}
57 private function bar(inout
$y) {}
60 function foo($x, $y, inout
$z, $q) {}
61 function bar(inout
int $x) {}
62 function f
<T
>(inout vec
<T
> $v, ...$_) {}
63 function g($q, inout dict
<string,vec
<int>> $r, ...$_) {}
64 function h(inout
$a, inout
$b, $t, inout
bool $c, $a = 12) {}
66 function fptr
<T
as (function(inout
int, inout
bool, inout
float): arraykey
)>(
68 (function(inout
int, inout Foo
, inout
float): Bar
) $b
69 ): (function(inout
float, inout
int, float): int) {
72 function main($a, $b, inout
$c, $d, $e) {
75 foo(1, 2, inout
$a, 3);
77 f(inout
$a['v']['s'], $b['x'], $c);
79 h(inout
$a['m'], inout
$b, $c, inout
$a[$e], $e);
82 $y = Herp
::inout(inout
$x);
83 $z = Derp
::foo +
$x +
$y;
87 <<__EntryPoint
>> function main_entry(): void
{
89 main(1, 2, inout
$a, 4, 5, 6);
90 \var_dump
(Cls
::inout
, Derp
::foo
);