language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
PHP
hhvm/hphp/hack/test/full_fidelity/cases/await_as_an_expression/await_as_an_expression_lambda.php
<?hh async function foo(): Awaitable<void> { $x = async { await genx(); }; $x = async { f(await genx()); }; $x = async () ==> await genx(); $x = async () ==> f(await genx()); $x = async () ==> { await genx(); }; $x = async () ==> { f(await genx()); }; $x = async function () { await genx(); }; $x = async function () { f(await genx()); }; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/await_as_an_expression/await_as_an_expression_simple.php
<?hh async function foo(): Awaitable<void> { $x = (await genx()) ? 1 : 2; $x = (await genx())->foo(await geny()); $x = (await genx())?->foo(42); $x = (int)(await genx()); $x = (await genx())->foo; $x = Foo::FOO; $x = Foo::foo(await geny()); $x = (await genx()) is int; $x = (await genx()) as int; $x = (await genx()) ?as int; $x = isset(varray[][await genx()]); $x = Map { (await genx()) => (await geny()) }; $x = Vector { (await genx()) }; $x = Set { (await genx()) }; $x = new (await genx())(await geny()); $x = shape('key' => (await genx())); $x = tuple((await genx()), (await geny())); $x = darray[0 => (await genx()), (await geny()) => (await genz())]; $x = darray[(await genx()) => (await geny())]; $x = varray[(await genx()), (await geny())]; $x = dict[(await genx()) => (await geny())]; $x = vec[(await genx()), (await geny())]; $x = keyset[(await genx()), (await geny())]; $x = (await genx())[(await geny())]; $x = (await genx()) && true; $x = (await genx()) || true; $x = (await genx()) ?: 42; $x = (await genx()) ?? 42; $x += (await genx()); $x -= (await genx()); $x *= (await genx()); $x /= (await genx()); $x **= (await genx()); $x .= (await genx()); $x %= (await genx()); $x ^= (await genx()); $x |= (await genx()); $x &= (await genx()); $x <<= (await genx()); $x >>= (await genx()); $x = (await genx()) + (await geny()); $x = (await genx()) - (await geny()); $x = (await genx()) * (await geny()); $x = (await genx()) / (await geny()); $x = (await genx()) ** (await geny()); $x = (await genx()) === (await geny()); $x = (await genx()) == (await geny()); $x = (await genx()) <= (await geny()); $x = (await genx()) >= (await geny()); $x = (await genx()) < (await geny()); $x = (await genx()) > (await geny()); $x = (await genx()) <=> (await geny()); $x = (await genx()) != (await geny()); $x = (await genx()) !== (await geny()); $x = (await genx()) & (await geny()); $x = (await genx()) | (await geny()); $x = (await genx()) << (await geny()); $x = (await genx()) >> (await geny()); $x = (await genx()) % (await geny()); $x = (await genx()) ^ (await geny()); $x = (await genx()) |> f($$); <div attr={await genx()} {...(await genx())}/>; <div attr={await genx()} {...(await genx())}>{await genx()}</div>; +(await genx()); -(await genx()); !(await genx()); ~(await genx()); @foo(await genx()); clone (await genx()); print (await genx()); await genx(); return await genx(); unset(varray[][await genx()]); if (await genx()) {} throw (await genx()); switch (await genx()) { default: break; } foreach ((await genx()) as $k => $v) {} foreach ((await genx()) await as $k => $v) {} for ((await genx()); 42; 43) {} try { await genx(); } catch (Exception $_) {} finally {} try {} catch (Exception $_) { await geny(); } finally {} try {} catch (Exception $_) {} finally { await genz(); } echo (await genx()); do { await genx(); } while (false); } async function bar() { yield (await genx()); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/await_as_an_expression/error/await_as_an_expression_invalid_location.php
<?hh async function foo(): Awaitable<void> { $x = 1 ? (await genx()) : 2; $x = 1 ? 2 : (await genx()); $x = $y?->foo(await genx()); $x = (false && (await genx())); $x = (true || (await genx())); $x = true ?: (await genx()); $x = $y ?? (await genx()); $x[(await genx())] = 42; $x[(await genx())] += 42; $x[(await genx())] -= 42; $x[(await genx())] *= 42; $x[(await genx())] /= 42; $x[(await genx())] **= 42; $x[(await genx())] .= 42; $x[(await genx())] %= 42; $x[(await genx())] ^= 42; $x[(await genx())] |= 42; $x[(await genx())] &= 42; $x[(await genx())] <<= 42; $x[(await genx())] >>= 42; $x[(await genx())] ??= 42; $x ??= (await genx()); $x = true |> await f($$); $x = 42 |> f(await $$); $x = true |> (await f(42)) + $$; $x = (await (await genx())); for ($i = 0; (await genx()); 43) {} for ($i = 0; 42; (await genx())) {} while (await genx()) {} do {} while (await genx()); require (await genx()); require_once (await genx()); include (await genx()); include_once (await genx()); ++$a[(await genx())]; --$a[(await genx())]; foo(inout (await genx())); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/byref-assignment/lvarvar.php
<?hh // strict function f(): void { $y = &$$s + 1; } function f1(): void { $y = &$$$$$s + 1; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/case_types/case_types_basic.php
<?hh case type CT1 = vec<int>; case type CT2 as arraykey, num = int; case type CT3 as nonnull = string | int | bool; case type CT4 = | string | int | bool; <<SomeAttr, OtherAttr>> case type CT5<+Tout, -Tin, T> = null;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/case_types/case_types_modules.php
<?hh module some.mod; public case type CT1 = int; internal case type CT2 = string; module case type Err = bool;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/case_types/case_type_errors_inside_module.php
<?hh <<file:__EnableUnstableFeatures('case_types')>> module some.mod; case type CT = C::T; internal case type CT2 = int; public case type CT3 = int | C::T;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/case_types/case_type_errors_outside_module.php
<?hh <<file:__EnableUnstableFeatures('case_types')>> case type CT = C::T; internal case type CT2 = int; public case type CT3 = int | C::T;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/case_types/case_type_error_variants.php
<?hh case type CT = |; case type CT2 = ; case type CT3 = string |; // Recover from forgetting to put a semicolon case type CT4 = int | string case type CT5 = int; case type CT6 = string | case type CT7 = int;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/ctx_const_both_bounds.php
<?hh abstract class AtLeastRxShallowButImpureIterator { abstract const ctx C super [rx_shallow] as [rx] = [rx]; public function call_into_rx()[this::C]: void { require_rx(); // ok (rx_shallow <: C <: rx) } } function require_rx()[rx]: void {} class ExactlyRxIterator extends AtLeastRxShallowButImpureIterator { const ctx C super [rx_shallow] as [rx] = [rx]; } class ExactlyRxShallowIterator extends AtLeastRxShallowButImpureIterator { const ctx C super [rx_shallow] as [rx] = [rx_shallow]; public function call_into_rx_shallow()[this::C]: void {} }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/ctx_const_no_bounds.php
<?hh interface Iterator { abstract const ctx Tc; } interface NonDetIterator extends Iterator { abstract const ctx Tc = [non_det]; } interface ImpureIterator extends Iterator { abstract const ctx Tc = [defaults]; } class ImpureIteratorImpl extends ImpureIterator { const ctx Tc = [non_det, rx]; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/ctx_const_redeclared.php
<?hh abstract class Base { abstract const ctx C; abstract const ctx C = [write_props]; } class Concrete { const ctx C = []; const ctx C = [rx]; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/ctx_const_super_bounds.php
<?hh interface PureIterator { abstract const ctx Tc super []; } interface AtMostNonDetIterator { abstract const ctx Tc as [non_det] = [non_det]; } class ImpureIterator extends Iterator { protected const ctx Tc super [defaults] = [defaults]; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/ctx_list_anon.php
<?hh function anons_with_ctx_list(): void { $anon_no_use = function()[defaults]: int use () { return 0; }; $x = 1; $anon_no_ret = function()[defaults] use ($ret) { return $x; }; $anon = function()[defaults]: int use ($ret) { return $x; }; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/effect_encapsulation.php
<?hh <<file:__EnableUnstableFeatures('context_alias_declaration')>> newctx X as [a] = [b]; newctx Y as [a, b] = [c]; newctx Z as [a] = [b, c]; newctx W as [] = [a]; newctx U as [a] = [];
PHP
hhvm/hphp/hack/test/full_fidelity/cases/coeffects/effect_encapsulation_parse_error.php
<?hh <<file:__EnableUnstableFeatures('context_alias_declaration')>> newctx X as [a] = [b]; newtype Y as [a] = [b]; // error
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/concurrent_complex_assign.php
<?hh async function foo1(): Awaitable<void> { $obj = new stdClass(); $obj_alias = $obj; $vec = vec[]; concurrent { $obj->prop1 = await gen_id(1); $obj_alias->prop1 = await gen_id(2); $vec[] = await gen_id(3); $vec[] = await gen_id(4); $obj->prop2 = await gen_id(5); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/concurrent_nested_with_async_closure_1.php
<?hh async function f() { concurrent { await async { concurrent { await g(); await h(); } }; await f(); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/concurrent_nested_with_async_closure_2.php
<?hh async function f() { concurrent { await async { await g(); }; await h(); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/concurrent_reuse_lval_2.php
<?hh async function f() { $x = 42; concurrent { $x = await genx(); await genx($x); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/concurrent_simple.php
<?hh async function foo(): Awaitable<void> { concurrent { $x = await genx(); await geny(); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/concurrent_with_other_await.php
<?hh async function foo1(): Awaitable<void> { await g(); concurrent { $x = await genx(); await geny(); } await h(); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/error/concurrent_nested_concurrent.php
<?hh async function foo(): Awaitable<void> { concurrent { concurrent { $x = await genx(); await geny(); } await genz(); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/error/concurrent_nested_with_async_closure_1.php
<?hh async function f() { concurrent { async { concurrent { await g(); await h(); } }; await f(); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/concurrent/error/concurrent_reuse_lval_2.php
<?hh async function f() { concurrent { await genx(inout_fun(inout $x)); await genx($x); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_extra_error_trivia.php
<?hh class C { // 'sta' becomes error trivia public sta function f() { } // 'meaninglessword' becomes error trivia public static meaninglessword function f() { } // no change in parsing public meaninglessword static function f() { } // no change in parsing public meaninglessword1 meaninglessword2 function f() { } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_method_decl_extra_token.php
<?hh class C { // parsed as a method containing an extra, invalid word: error1056 public sta function f() { } // parsed as a method containing an extra, invalid word: error1056 public static meaninglessword function f() { } // the below case isn't fixed yet; it retains its old behavior. public meaninglessword static function f() { } // the below case isn't fixed yet; it retains its old behavior. public meaninglessword1 meaninglessword2 function f() { } } class C { public sta // parsed as property declaration function f() { // parsed as method } } class C { public sta // parsed as property declaration public function f() { // parsed as method } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_missing_foreach_value.php
<?hh // strict abstract class C { public static function f1(): SomeMap { foreach($type_map as $key => ) { // missing '$value' $type_string_map[(string)$key] = Str\lowercase((string)str_replace('_', ' ', (string)$value)); } return new SomeMap( new Map($type_string_map) ); } public static function f2():SomeMap { $other_type_map = Numbers::getValues(); $other_type_string_map = Map {}; foreach($other_type_map as $key => $value) { $other_type_string_map[(string)$key] = Str\lowercase((string)str_replace('_', ' ', (string)$value)); } return new SomeMap( new Map($other_type_string_map) ); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_nested_function.php
<?hh class C { public function f() { // ERROR RECOVERY: report missing brace here public function g() { } } // instead of reporting it here, as was formerly done. // note that if there *is* a '}' at (9,1), the new behavior will report // two distinct errors: "missing '}' on line 5," and "extra '}' on line 9." // More cases. class C { public function f() { // ERROR RECOVERY: report missing brace here private function g() { } } class C { public function f() { // ERROR RECOVERY: report missing brace here protected function g() { } public function h() { } } class C { public function f(){ function g(){ // however, this is still parsed as a function inside method f. } } // missing '}' reported here.
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_nested_function_lite.php
<?hh class C { public function f() { // ERROR RECOVERY: report missing brace here public function g() { } } // instead of reporting it here, as was formerly done. // note that if there *is* a '}' at (9,1), the new behavior will report // two distinct errors: "missing '}' on line 5," and "extra '}' on line 9."
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_nested_incomplete_if.php
<?hh class C { public function f() { if ($x // ERROR RECOVERY: report missing right paren and right brace here public function g() { } } class C { public function f() { if ($x // ERROR RECOVERY: report missing right paren and right brace here private function g() { } } class C { public function f() { if ($x // ERROR RECOVERY: report missing right paren and right brace here protected function g() { } } // there are three of basically the same case just to make sure that // 'public', 'private', and 'protected' are all treated the same in // with respect to error recovery.
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_recovery_to_classish2.php
<?hh // This test simply exists to demonstrate a suboptimal case of error recovery // in the FFP. If you break this test, it doesn't necessarily mean you've done // anything wrong, since the FFP never behaved ideally on this code. // Ideally, this code would produce an error indicating that nested classes are // forbidden. But right now, the FFP assumes the programmer did *not* intend // to nest classes, and throws the errors commented below. class C1 { // missing right brace class C2 { } } // missing expression, missing semicolon
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_recovery_to_classish3.php
<?hh // report the right braces as missing at the ends of lines 4, 6, 8, and 11 trait T1 { interface I { class C { public $showingThat = 'this still works on partially completed classishes'; trait T2 { // class D still parses as nested inside of f, though. class C { function f() { class D{ } } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/context/test_single_extra_token_recovery.php
<?hh // Copyright 2004-present Facebook. All Rights Reserved. trait T1 extraNonsense { require extends T2 extraNonsense; private $x = CAPITAL_LETTERS !; final protected async function f1 extraNonsense (array $inputs extra) { $x = $x->getSomething()); $x = await X::forSomething($x)->gen('s'); if extraNonsense (!$x) { $x->y = false; $x->y[] = 's' 67835; // known error recovery suboptimality: './.65$' isn't parsed as // a contiguous token $x->y[] = 's' ./.65$; return false extraNonsense; } // All code below this point is error-free. if ((count($inputs) != 1) || (f($inputs) != $x->getSomething())) { $x->y[] = 's'; $x->y = false; return false; } if (!$x->test()) { $x->y[] = 's'; $x->y= false; return false; } list( $x, $x, ) = await genSomething( X::genSomething($x), X::get()->genSomething($x), ); } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/declare_local/good.php
<?hh <<file:__EnableUnstableFeatures('typed_local_variables')>> class C<T> {} <<__EntryPoint>> function main() : void { let $x : int = 1; let $y : C<vec<int>> = new C(); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/array_non_static.php
<?hh // strict function get(): int { return 1; } function f(array<int> $vec = varray[get(), 2]): void{}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/call_in_static_vec.php
<?hh class C { public static function f() { return "lol"; } } function f1($x = vec[C::f()]): void{}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/call_in_static_vec_like_array.php
<?hh class C { public static function f() { return "lol"; } } function f($x = varray[C::f()]): void{}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/func_arg.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. class A { public static function get_int():int {return 5;} public function take_int(int $a = A::get_int()): void{} }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/list_expression.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. class A { const string S = "hello"; public string $s = "${A::S}"; const string S1 = "${A::S}"; public function foo(string $p = "${A::S}"): void{} }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/list_non_static.php
<?hh // strict function get(): int { return 1; } function f((int, int, int) $list_tuple = list(get(), 3, 4)): void{}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_default_args/tuple_as_constant.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. function get_int(): int { return 0; } function f((int, int)$mt = tuple(get_int(), get_int())): void{} class A { public function f((int, int)$mt = tuple(get_int(), get_int())): void{} }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/function_pointers/parse_precedence.php
<?hh // Stranger placements for <> foo < bar<>(0 > 0, foo<>); foo < bar<>(Bar > 0, 10 > Qux); foo < bar(2 > foo<int,string>); foo < bar(3 > x::foo<int,string>); $x ?? foo<>; $x ?? foo<int>; $x ?? x::foo<>; $x ?? x::foo<int>; 42 * foo<>; 42 * foo<int>; 42 * x::foo<>; 42 * x::foo<bar>; baz(foo<>); baz(foo<baz>); baz(x::foo<>); baz(x::foo<baz>); 42 * foo<> < 90; 42 * foo<int> < 90 + 50; 42 * x::foo<> < 90 === true; 42 * x::foo<int> < 90 === true; $f === foo<> ? 1 : 2; $f === foo<bar> ? 1 : 2; $f === x::foo<> ? 1 : 2; $f === x::foo<bar> ? 1 : 2; foo<>($f === foo<> ? 1 : 2); foo<>($f === foo<bar> ? 1 : 2); foo<bar>($f === foo<> ? 1 : 2); foo<bar>($f === foo<bar> ? 1 : 2); x::foo<>($f === x::foo<> ? 1 : 2); x::foo<>($f === x::foo<bar> ? 1 : 2); x::foo<bar>($f === x::foo<> ? 1 : 2); x::foo<bar>($f === x::foo<bar> ? 1 : 2); $f === Vector<int>{1,2,3} ? foo<> : foo<>; $f === Vector<int>{1,2,3} ? foo<int> : foo<int>; $f === Vector<int>{1,2,3} ? x::foo<> : x::foo<>; $f === Vector<int>{1,2,3} ? x::foo<int> : x::foo<int>;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/array_non_static.php
<?hh // strict function get(): int { return 1; } function test(): void { $_ = (array<int> $vec = varray[get(), 2]): void ==> {}; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/call_in_static_vec.php
<?hh class C { public static function f() { return "lol"; } } function test(): void { $_ = ($x = vec[C::f()]): void ==> {}; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/call_in_static_vec_like_array.php
<?hh class C { public static function f() { return "lol"; } } function test(): void { $_ = ($x = varray[C::f()]): void ==> {}; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/func_arg.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. class A { public static function get_int():int {return 5;} public function test(): void { $_ = (int $a = A::get_int()): void ==> {}; } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/list_expression.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. class A { const string S = "hello"; public string $s = "${A::S}"; const string S1 = "${A::S}"; public function test(): void { $_ = (string $p = "${A::S}"): void ==> {}; } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/list_non_static.php
<?hh // strict function get(): int { return 1; } function test(): void { $_ = ((int, int, int) $list_tuple = list(get(), 3, 4)): void ==> {}; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lambda_default_args/tuple_as_constant.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. function get_int(): int { return 0; } function test(): void { $_ = ((int, int) $mt = tuple(get_int(), get_int())): void ==> {}; } class A { public function test(): void { $_ = ((int, int) $mt = tuple(get_int(), get_int())): void ==> {}; } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/legacy_attribute_syntax/no_legacy_attribute_syntax.php
<?hh <<Attr1, Attr2(5)>> function f(): void {} <<__Memoize>> function g<<<__Soft>> reify T>(<<__Soft>> string $_): <<__Soft>> void {} <<Oncalls('test')>> class C { <<Attr1>> public int $x; } g<<<__Soft>> int>('blah');
PHP
hhvm/hphp/hack/test/full_fidelity/cases/legacy_soft_typehints/no_legacy_soft_typehints.php
<?hh type t = @darray<int, @string>; type u = varray<@int>; function f<T>(): void {} function g(@int $_): @string { f<@float>(); return "hello"; } abstract class C { <<TestAttr>> protected @float $x; const type T = @int; public function __construct(<<TestAttr>> public @int $y) {} public async function f(): Awaitable<@int> { return 42; } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lval_as_an_expression/lval_as_an_expression_simple.php
<?hh class MyDisposable implements IDisposable { public function __dispose(): void {} } function my_inout1(inout int $x) { $x++; } function my_inout2(inout int $x): int { $x++; return 0; } function foo(): void { $x = 42; $x += 42; $x -= 42; $x *= 42; $x /= 42; $x %= 42; $x **= 42; $x .= 42; $x &= 42; $x |= 42; $x ^= 42; $x <<= 42; $x >>= 42; $x ??= 42; $x++; ++$x; $x--; --$x; $dict = dict[]; for ($x = 42, $x = 43; false; $x = 44, $x = 45) {} using $x = new MyDisposable(); using ($x = new MyDisposable(), $y = new MyDisposable()) {} my_inout1(inout $x); @my_inout1(inout $x); $y = @my_inout1(inout $x); my_inout1<int>(inout $x); $y = my_inout2(inout $x); $y = my_inout2<int>(inout $x); list($x1, $x2, list($x3, $x4)) = tuple(1, 2, tuple(3, 4)); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/lval_as_an_expression/error/lval_as_an_expression_simple_error.php
<?hh class MyDisposable implements IDisposable { public function __dispose(): void {} } function my_inout1(inout int $x) { $x++; } function my_inout2(inout int $x): int { $x++; return 0; } async function foo(): void { ($x = 42); ($x += 42); ($x -= 42); ($x *= 42); ($x /= 42); ($x %= 42); ($x **= 42); ($x .= 42); ($x &= 42); ($x |= 42); ($x ^= 42); ($x <<= 42); ($x >>= 42); ($x ??= 42); ($x++); (++$x); ($x--); (--$x); ($dict = dict[]); for (($x = 42), ($x = 43); false; ($x = 44), ($x = 45)) {} using (($x = new MyDisposable())); using (($x = new MyDisposable()), ($y = new MyDisposable())) {} (my_inout1(inout $x)); (my_inout1<int>(inout $x)); ($y = my_inout2(inout $x)); ($y = my_inout2<int>(inout $x)); $y = (my_inout2(inout $x)); $y = await (my_inout2(inout $x)); (list($x1, $x2, list($x3, $x4)) = tuple(1, 2, tuple(3, 4))); $y = await my_inout2(inout $x); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/internal_keyword1.php
<?hh <<file:__EnableUnstableFeatures("modules")>> module foo; internal abstract class Foo { internal function foo(): void {} internal abstract function bar(): void {} abstract internal function bar2(): void {} internal async function as(): Awaitable<void> {} } internal function foo(): void {} internal trait TFoo {} internal interface IFoo {} <<SomeAttribute>> internal class ClassWithAttribute { }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_decl_good.php
<?hh <<file:__EnableUnstableFeatures('modules')>> new module Foobar { } new module BiNgBaZ {} <<Attributes('?'), YesAttributes('.')>> new module Lol_Attributes {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_reference_bad.php
<?hh <<file:__EnableUnstableFeatures('modules')>> <<file:__EnableUnstableFeatures('module_references')>> new module z { imports { x. } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_reference_bad2.php
<?hh <<file:__EnableUnstableFeatures('modules')>> <<file:__EnableUnstableFeatures('module_references')>> new module z { imports { x.*.y } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_reference_bad3.php
<?hh <<file:__EnableUnstableFeatures('modules')>> <<file:__EnableUnstableFeatures('module_references')>> new module z { imports { z.self } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_reference_bad4.php
<?hh <<file:__EnableUnstableFeatures('modules')>> <<file:__EnableUnstableFeatures('module_references')>> new module z { imports { global.x } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_reference_good.php
<?hh <<file:__EnableUnstableFeatures('modules')>> <<file:__EnableUnstableFeatures('module_references')>> new module x { } new module y { } new module z { imports { x } exports { y } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/modules/module_reference_good2.php
<?hh <<file:__EnableUnstableFeatures('modules')>> <<file:__EnableUnstableFeatures('module_references')>> new module a.b { } new module a.c { } new module z.c { } new module z { imports { a.*, self.c, global, } exports { a.* } }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/namespaces/namespace_as_namespace_name3.php
<?hh // namespace should not be allowed to be the name of a namespace // This checks for case sensitivity. Should still not be allowed namespace Namespace {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/namespaces/namespace_as_namespace_name4.php
<?hh // namespace should not be allowed to be the name of a namespace // This checks for case sensitivity. Should still not be allowed namespace namespace\Foo {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/namespaces/reserved_namespace_token.php
<?hh // Using `namespace` in any case as a name is not allowed class Namespace {} function test(): void { $y = new Namespace(); } function Namespace(): void {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/namespaces/reserved_namespace_token2.php
<?hh // Using `namespace` as a name is not allowed class namespace {} function test(): void { $x = new namespace(); } function namespace(): void {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/namespaces/trailing_backslashes.php
<?hh // Qualified names should not have trailing backslashes function test(): void { $x = new Foospace\(); $y = Foospace\bar\(); $z = Foo\::class; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/namespaces/trailing_backslash_namespace_use.php
<?hh // Namespace group use clauses should not have trailing backslashes // Prefix of namespace group use is okay to have trailing backslash use namespace A\{B\};
PHP
hhvm/hphp/hack/test/full_fidelity/cases/package/cross_package_bad2.php
<?hh <<file:__EnableUnstableFeatures('package')>> class C { <<__CrossPackage(foo, 123)>> function f(): void {} }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/package/cross_package_good.php
<?hh <<file:__EnableUnstableFeatures('package')>> class C { <<__CrossPackage("foo")>> function f(): void {} } <<__CrossPackage("bar")>> function h(): void {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/package/package_bad_invalid_names.php
<?hh <<file:__EnableUnstableFeatures('package')>> $_ = package 123 || package $some_var || package :xhp-name;
PHP
hhvm/hphp/hack/test/full_fidelity/cases/package/package_good.php
<?hh <<file:__EnableUnstableFeatures('package')>> if (package foo) { invariant(package foo, "package foo exists"); }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/static_const_props/static_const_prop_init.php
<?hh // strict // Copyright 2004-present Facebook. All Rights Reserved. class A { <<__Const>> static int $o; <<__Const>> static int $p = 6; <<__Const>> static int $m, $l = 5; const int P; const int M = 7; const int N, O = 7; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-consts_multiple-bounds/as-only.php
<?hh <<file:__EnableUnstableFeatures('type_const_multiple_bounds')>> abstract class A { abstract const type T0; abstract const type T1 as string; abstract const type T2 as arraykey as int; abstract const type T3 as int as arraykey as num = int; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-consts_super-bound/primitives.php
<?hh <<file:__EnableUnstableFeatures('type_const_super_bound')>> abstract class GoodWithExperimental { abstract const type T super string; abstract const type Tdflt super int = num; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/alias-toplevel.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> abstract class A { abstract const ctx C; abstract const type T; } type AWithTIntSub = A with { type T as int; }; type AWithSuperDefaults = A with { ctx C super [defaults]; }; class G<T> {} type GA<Ta as A with { type T = int; ctx C as [globals] super [defaults]; }> = G<Ta>; type ANoTrailingSemiSingleMember = A with { type T = int }; type ANoTrailingSemiMultiMember = A with { ctx C = []; type T as arraykey }; type AWithEmptyRefinement = A with {};
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/chained-with_bad.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> interface I { const type T1; const type T2; } type TBadAmbiguous = I with { type T1 = int } with { type T1 = string }; type TBadMinimal = I with {} with {};
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/empty_class.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> abstract class A { abstract const type T; } class G<T as A with {}> {} class G2<T2 as G<A with {}>> {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/empty_fun.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> abstract class A { abstract const type T; } function in_param_parens((A with {}) $a): void {} function in_param(A with {} $a): void {} function in_return(): A with {} {} function in_return_parens(): (A with {}) {} function in_fun_hint((function(A with {}): A with {}) $_): void {} abstract class B extends A { public abstract function in_meth_type_param<Ta as A with {}>(Ta $_): void; public abstract function in_meth_param(A with {} $a): A with {}; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/keyword-missing_bad.php
<?hh abstract class A { abstract const type T; // returns refined A, or A and empty body? public abstract function ambiguous_parse(): A {} ; } type TAlias = A { type T = int };
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/nested_box-of-box.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> interface Box { const type T; function box_of_box_of_int(): Box with { type T as Box with { type T = int } }; }
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/refinement-duplicate-member.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> type A = A with { type T as int; type T = int; };
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/refinement-member_bounds-missing_bad.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> interface I {} function bad_no_bounds1(I with { type T } $a): void {} function bad_no_bounds2(): I with { type T; ctx C } {} function bad_no_bounds_first(): I with { type T; ctx C = []; } {} function bad_no_bounds_last(): I with { type T as int; ctx C; } {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/refinement-member_eq+non-eq-bounds_bad.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> interface I {} function bad_eq_and_as(): I with { type T as arraykey = int } {} function bad_eq_and_super(): I with { ctx C super [defaults] = [] } {} function bad_eq_and_both_super_and_as( I with { ctx C as [read_globals] super [globals] = [globals] } $_ ): void {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/refinement-member_extra-const_bad.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> class A {} function f( A with { const type T = int } $_ ): void {}
PHP
hhvm/hphp/hack/test/full_fidelity/cases/type-refinements/with-in-xhp-attr_good.php
<?hh <<file:__EnableUnstableFeatures('type_refinements')>> class :simple-type extends XHPTest { attribute bool with-b; } function simple_attr(:simple-type $obj): bool { return $obj->:with-b; } class :nonsimple-types extends XHPTest { attribute ?bool with-b1, ?bool with-b2; } function nonsimple_attrs(:nonsimple-types $obj): bool { return $foo->:with-b1 + $foo->:with-b2; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_0_4263058_1.txt
<?hh class uH < + vKrD , rKz as ? hWVcIcY , + wHZDwFJp > extends sPAnFvIQ < yBk > { use tZQdIt < fTWHaQiiq > ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_0_589201_0.txt
<?hh << cFIWE ( ) , zPtAT >> trait fXhjV < wUJNXtVJ > { use gR , rDrPkh < bAGtLz , cGjSKy , hEUv > , aPd ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_0_7248005_1.txt
<?hh << dSgDPio >> trait oWLax { use uNykZaqW , kZ , qYGWHYyS , rKhKgHLX ; require implements eSwp ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_0_7896229_0.txt
<?hh function tQNS < + eGpX as num > ( << iMTUYa ( ) >> ( function ( int , bool ) : mixed ) $mBJezoN , num $zS = $zQfNvt , ... ) : classname < gFRXHLlQ > { }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_0_7986013_1.txt
<?hh async function qZhaVyhC ( this $gDzl , << kQYGJU >> shape ( ) $gLM ) : shape ( 'single string' => int ) { ( ( bool ) $aByzk ) ; continue ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_1000_2465402_0.txt
<?hh namespace { trait hHH { } function iUxBSqZ < oKbLTMqIp > ( ) : array < void > { } use xHUZpReu as gVDKKMZZm ; require "nowdoc" ; << jN ( ) >> trait gMcreE { use sB , zLe , zJJgag < lVhmA , fZnQEhZ < gYmsYigMN > , resource > , jBjRhB < yJ , arraykey , kIUvvgOr > , vPLrbCDaE , aQ , aZQDiiLyI < shape ( ) > ; use oDKPRW < bSeGENWTT > ; << yMwMueSsD >> private function __destruct ( ) { { for ( ; ( string ) await $zTM = shape ( 'single string' => "nowdoc" , 'single string' => ( ( $sZB ) ) - ( ( "double string" ) ) ) ; ) do do ; while ( $eRuGFdc ) ; while ( $gL -= 0b101010 ) ; while ( array ( ) ) ( bool ) $oACaUVEv >>= ( $jZSV %= $rDhWeRSL ) ; if ( 0b101010 ) ; elseif ( $kTnznm ) ; else ; switch ( $yJIqkQUee *= ( $xIjLo += 12 ) ) { default : { } throw $qOQX += $hYTWNxEnI ; } } while ( ( ( ( $wYneSoxR instanceof $uUYoXzkhA ) ) ) <= ( ( ( "nowdoc" ) ? : ( $tD ) ) ) ) while ( shape ( 'single string' => 0x16 , 'single string' => $pWqE ) ) foreach ( 0123 await as $xUjWVNxcu ) ; foreach ( ( $cS = 0123 ) as ( int ) @ ( ( float ) ( ( $iKU ) ? : ( $kS ) ) ) => $hVl ) throw $vF ; for ( 42.42 ; ; $lO ) ; ; ; ; ; switch ( ( ( 42.42 ) ) === ( ( $jWC ) ) ) { default : ; default : ; } { for ( 'single string' ; ; ) try { } finally { } do { continue ; } while ( clone shape ( ) ) ; } while ( ( ( ( ( $cI ++ ) -> jPpMmipJ -> iD -> rKaSuvQ -> ( shape ( ) ) ) ? ( $sRvpxa *= ( $zGXIyiWMl = ( $iPAJkyZ = ( $cGhmZNKL &= 42.42 ) ) ) ) : ( ( $rXXH ) ? ( $yZ ) : ( "nowdoc" ) ) ) ) || ( ( ~ ( string ) ( $jLhRuNV -- ) ) ) ) { if ( $oKpMj += $jWEW -> ( ( ( 0x16 ) ) << ( ( 12 ) ) ) ) do for ( ; "heredoc" ; ( ( bool ) @ $jUHxsWH = @ ( $hL ++ ) ) ) do ; while ( 0x16 ) ; while ( function ( ) { } ) ; elseif ( array ( ( $aT = ( $pAohWeVoB = ( $kWvHRdn *= ( $iANDN = shape ( 'single string' => $aRZbjSeo , 'single string' => $yQVQG ) ) ) ) ) , ) ) { } } } } << fLk , uYFykpNyE , pDD ( $lBBgtW = clone @ ( ( ( ( ( $dZRO -- ) ) ) * ( ( ( bool ) ( await $yIP += 0123 ) ) ) ) << ( ( ( $bXKlgqUI -> ( $lQX ) ) ? ( ( ( string ) $kBICPgsjt %= 0x16 ) ) : ( function ( ) { } ) ) ) ) - ( ( ( $nPgkq = $rE instanceof pFY ) ) ) -> ( ( ( clone $tQr = $bASIebEWm ) ) + ( ( ( ( $mVBcgltn ++ ) ) ? : ( ( array ( $iGf => $rIsIDpBX ) -> ( ( ( "double string" instanceof gSgL ) ) ) ) ? : ( ( bool ) ( await @ ( ( ( string ) $oB ) ? : ( ( $zU ) ) * ( ( $fHJ ) ) ) ) ) ) ) ) ) ) , dFcFE ( $tZj += ( $zFVlMjmm = clone $iRQP = ( $pLbrype = ( $nZ -= ( $rGVB = - ( string ) ( ( ( array ( ) instanceof $oPrFkRI ) ) ? : ( ( ( float ) $uKCoxYoXE instanceof lY ) ) ) ) ) ) ) ) >> trait tZwcgFVuI < zTPdbdKT as array < array < void > , qRKSzsmgL < wJEbX > > , kSdhfR as resource > implements aVkfTEKMK , nVQToseQ < dBpOAPNPR , uPsmGBuiA , jToesS , pUFZ > , fVbvFs , qA < gU , ( function ( qZwM < dE > , ( function ( num , string ) : int ) ) : this ) , array < ? void , array < classname < aLoWjB > > > , float , hPBVgNNPH > , dQaMGlw < oGIElMZ > { use rD < sEg > ; use fGxYZgSpx < ( function ( vIYYRY < dFsNI > , arraykey , array < num , arraykey > , resource , zTaYSR < gH , nD > ) : ( function ( ( function ( ) : shape ( 'single string' => arraykey ) ) ) : self :: gTkg ) ) > ; private static vHycyPfSX $hBBBty = ( string ) function ( << uI ( ( ( @ list ( $aO , $mNEr ) ) ? : ( ( 12 instanceof hGgQFv ) ) ) ) >> mixed $cHFQ = $gRVris >>= function ( $nXZNjjwe ) { } , ( function ( ) : classname < vSWbKDC > ) $kSWrUpa ) : this { while ( ( @ shape ( 'single string' => $iUsFnW , 'single string' => ( ( 0b101010 instanceof zMGFfpJ ) ) , 'single string' => $tE = await $rIpNm ) ) ) do ; while ( $gHOJZ = ( $kCEec %= ( $pUeC ^= ( $zPp >>= 42.42 ) ) ) ) ; try { try { } catch ( string $yNOsqpTz ) { } finally { } return $kJpj = ( $fGqGAUzc = ( $yKtvz = function ( ) { ; ; } ) ) ; } catch ( bool $iW ) { } catch ( bool $ePsEOSDzy ) { } catch ( void $xGHEP ) { } finally { foreach ( 42.42 as $yAfD => $pVaoh ) ; } } ; } }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_1000_5533345_0.txt
<?hh namespace { require 'single string' ; interface iAiJXr < - dKpWVv as classname < sZwaT > , oTU as iMjMYk :: pFILTI :: hYlaH :: cCr , kEQHFQIlj > { } use yGud , fAZE as gZWy , fQQ ; enum nIigkDfd : string as float { } trait bW < + hXrCtLqEy as this , + gRAljKc > implements zOz < ? array < void > > , nUGZJE , jZMNBeh { use kMcmZfL , mYJAr , sPlsq , tAaOLwtV < num , fUsBSA > ; use uTSzoA ; use dMmi < int > , eTjzgYWR , eDrb < num , nLUfvVcM , kSWCkCUYc , lKrIaM > ; } type dWuHc = resource ; async function nKhDbH < iRAfT as classname < eRMokCM > , + sNq > ( ) : void { while ( ( clone ( ( float ) ! ( bool ) $dHfruoOf <<= ( $zTeVLGH = ( $eLHMTST ^= ( string ) $bBIlfD /= $dAtgN ) ) ) ) ) throw $qUE = ( $zJxSOevk >>= 0x16 [ new $hVNsdEe ( "nowdoc" , $kOATLhJFP ) ] ) ; while ( ( await $mFFYCA = ( $iFgHe = ( int ) ( [ ] -> iHUmM ) ) ) ) ; while ( $kTLcLBFbt = 0x16 ) { switch ( $oBZLl >>= ( - ( int ) ( int ) $yNNlAX |= ( $zEha = $cXzQLNevt ) ) ) { default : ; default : ; case $zDLnpukG : ; default : foreach ( 42.42 await as $vBWa => $bZGUZ ) ; } while ( ( ( $qNeHDV -= array ( ) instanceof ySmdRU ) ) ) while ( array ( $mZFywuGqQ => $iGiOTmgb , ( ( float ) await ( ( string ) ( await ( bool ) $eZuPomT = ( float ) await ( ( 42.42 ) ? : ( 42.42 ) ) ) ) ) ) ) foreach ( 12 await as $iAIVSf ) ; } do throw function ( << gEuJa >> num $gTTj , << zTYVBTHT >> $uOnPihvl = $dSvjOk , ( string , arraykey ) $sLLd = $jWjrOy = ( $fHZJGaAAv = ( $gEqGqFm >>= ( $eJ = $mZpfysBPI ) ) ) ) : ( function ( ( function ( this , int ) : num ) ) : mixed ) { ; ; switch ( $vSnPHEe ) { default : ; } if ( $zSHRtSOo ) ; elseif ( $zYZnZnhax ) ; else ; switch ( ( ( string ) ( string ) ( ( 42.42 ) ? ( $aArPiDvVc ) : ( $eKrISVAna ) ) ) ) { default : ; default : ; ; } } ; while ( ( @ $hBqnm = clone $wOPjdFkDP ) ) ; } namespace { newtype xS as classname < kMYVi > = dUjUKI ; require ( "nowdoc" ) ; enum hPHF : string { rZCbdCGoX = shape ( ) ; eEu = array ( ( bool ) ( ~ ( string ) $bGVXvX >>= ( $qULkPWfH += ( $gUKCQp = ( $tRKihuKYm = array ( $wKXjkK , $xTVzlIdnz ) ) ) ) ) , ) ; } function eOfYn < - eWCCsb > ( ) : num { continue ; } function yVBDwmi ( << iGXhsgxhz >> this :: iJbag $mADBj = $hKyDT = ( $oSUEbvCQ &= ( 42.42 ) ) ) : array < ? classname < mOnJfQ > > { foreach ( ( ( ( $oRe ) ) <= ( ( $pPcYnYHys ) ) ) - ( ( 0x16 [ $uSV ] ) ) as @ function ( << yKsYjqE >> num $eQfxYGl = 42.42 ) { } => $pQuG ) for ( 0123 , 0b101010 ; ( ( float ) ( ( 42.42 ) ? ( 42.42 ) : ( $dRJWJYGM ) ) ) ; $iYjP , "double string" ) { if ( 42.42 ) ; elseif ( 42.42 ) ; } for ( "heredoc" , await $qHZk = ( $fTTi ^= 'single string' ) , ( bool ) "heredoc" [ 42.42 ] -> ( $nNhwNCOzT = ( $vARo = function ( ) : int { } ) ) , ( ( ( $wRRUMY ++ ) ) ) || ( ( ( $mVPKap ) ) >= ( ( $jUKk ) ) ) ; ; ) { do ( bool ) $vHFO .= ( $aNOlSqh = shape ( 'single string' => $oKx , 'single string' => 42.42 , 'single string' => 0x16 ) ) ; while ( 0x16 ) ; } } << iKHVd , fKZ , rQTpntqxF ( ) >> async function xBRC ( yIHNfzxY $jEpH , resource $nXZ , string $nLtJcN = 'single string' , << lTL >> zPhBtf $qGyJhnm , classname < rThebaui > $pDWhVsHv = ( ( 12 ) ) ^ ( ( 0x16 ) ) , << oUusby , fYpkDopb , oUJkn ( ) >> self :: hYQjcdto $rMstjFhh = array ( $kYx => $kIIPJnMTT , "heredoc" => $lTl ) , ... ) : num { switch ( ( ( ( new xZW ( ( $gAioJ %= ( $rBlloVXZ *= 42.42 ) ) ) ) ) % ( ( ( int ) ( - ( float ) ( ( $mPiTEwSWl instanceof $hVjtzvT ) ) ) ) ) ? : ( + ( float ) ( ( string ) @ await ( ( ( "double string" -> ( $lXwODNDpN ) ) ? : ( $aIj -> ( $sP ) ) ) ? : ( ( 42.42 [ 0123 ] ) ? : ( ( $cB ) ? : ( $uDej ) ) ) ) ) ) ) ) { default : foreach ( ( ( ( $uYVscwU ) ) - ( ( 42.42 ) ) ? ( ( ( 0b101010 ) ) + ( ( 42.42 ) ) ) : ( ( 42.42 ) ? ( $eZBbVoG ) : ( 42.42 ) ) ) await as ( ( await ( ( string ) $pSdKs = ( int ) $vZPhQi = function ( $fSBoYPW ) { } ) ) ) && ( ( ( "heredoc" ) ? ( 42.42 ) : ( $tZYPL ) ) ) => $gXlylbs ) ; } } enum cAJJ : int { } } async function qM ( ) : shape ( 'single string' => array < this > ) { } }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_1000_7183836_0.txt
<?hh function xLoPv ( array < shape ( 'single string' => ( function ( ) : oZoPqkwU < array < shape ( ) , shape ( 'single string' => tQilflkbs , 'single string' => void ) > > ) , 'single string' => int , 'single string' => this , 'single string' => string ) > $nM = $wRm , << vKYNzmCLc ( $mMAAh = $eXTxvA , $cT &= array ( clone ( ( string ) ( int ) $cPu = function ( $sFAgKgOZy ) : uOW use ( $gSc ) { } ) -> zMdwCObBd [ ( array ( "double string" => 42.42 , 0b101010 , 42.42 ) -> xUItZ ) ] -> oLLQLcOkA ( shape ( ) ) => $rGlGziKqy = ( $tHAreeM -= shape ( ) ) , ) ) >> ( function ( array < ( function ( float ) : gIelzb < zDLNkTn , yTzpqVoI , zJ , vFOm > ) > ) : pXtZLlPI ) $uASBiEik , ... ) : shape ( ) { foreach ( ( ( @ ( @ function ( ) { ; ; } ) instanceof $lZv ) ) await as array ( ) => $sZpJCP ) $aPghjmOb ; ( ( $vUOXQNnA ) ) / ( ( $oYp ) ) ; ( ( 42.42 ) ) || ( ( $tNmLh ) ) ; for ( $dLMpM ; $eRraFofe ; $eTZF ) ; ; ; ; ; if ( 0123 ) ; ; ; if ( 0123 ) while ( ( ( ( $cDvSDbELU -- ) ) ) ) do do return ; while ( 0b101010 ) ; while ( ( ( ( int ) 12 ) ? : ( ! ( bool ) $iGqVGdZq ) ) ) ; return ( function ( ( function ( ) : self :: lOjNsM ) $dFUiMrT = $zMD , << yK ( shape ( 'single string' => array ( 12 , $wLZuZgV , ) , 'single string' => @ ( ( 42.42 instanceof $cP ) ) ) ) , rErr >> ( tJdhAp < ? resource , ? float > , classname < jKNh > , ( function ( num ) : num ) ) $qCAESOLlo ) { while ( ( ( - ( string ) $bMeFPzta += ( $vCl = $hBi ) ) ? ( function ( ) : bool use ( $fP ) { } ) : ( ( 42.42 ) ) !== ( ( 42.42 ) ) ) ) continue ; foreach ( ( ( ( 42.42 ) ) ^ ( ( 42.42 ) ) ) && ( ( ~ ( string ) $cMfbIIgTE ) ) await as list ( ) ) { ; } } ) ; switch ( $cSSHah = shape ( ) ) { default : ; default : ; default : continue ; default : { return ; } switch ( $lINZlT ) { default : ; } foreach ( $vMMVmd as $nDM ) ; case ( ( await await $nRqkDzZ = shape ( 'single string' => $yG .= $fLRxYaEG ) ) ) === ( ( ( bool ) $kFMZ = ( $aDejgTgg = 42.42 ) ) ) : foreach ( ( ( $xFBUWftks ++ ) ) await as $wAO ) while ( $hXYzDqvi ) ; default : break ; ; ; ; switch ( $tNXE ) { default : ; ; } for ( ; ; ) foreach ( $jBTFk = ( $mVKrvo = function ( ) { } ) as $rAmXIcG ) { switch ( 0b101010 ) { default : ; } } if ( array ( ( ( 0123 instanceof $vFCTE ) ) , $fWhkoonPA *= 42.42 , ) ) while ( ( ( $wYxGrv ) ) . ( ( 'single string' ) ) ) if ( $tY ) ; elseif ( 0123 ) ; elseif ( $bQhMrFUy ) ; elseif ( $dVKi ) ; elseif ( $xKUGVS ) ; else { } } while ( function ( arraykey $gT = $aTe -= 42.42 ) : this { foreach ( ( ( ( $nQIg ) ) + ( ( $gIwvGD ) ) ) >= ( ( ( 12 instanceof $oKTvvew ) ) ) await as list ( $xJW , $wFcHS ) ) switch ( $wCmv .= ( $fGzcWWdLg = "heredoc" ) ) { default : ; default : ; ; } { } while ( ( $dUasM = ( ( ( $sDAnIdeN = ( $vFmPfiNx = ( @ @ - ( bool ) $rVInqJwmz /= ! ( string ) $hSdaBoy ) ) instanceof yWgOd ) ) ) -> zH [ ] ) ) list ( $zEloZnxo , $bWJpmHyMa , $bUXyEIN , $rVZoXV , $iKpxnKU ) ; } ) do { try { } finally { for ( ( float ) ( ( ( $qSfxVRGjp instanceof iHl ) ) ) ; ; ) for ( $wPvcHUKNT ; ; 42.42 ) ; for ( 12 , 42.42 ; ; $aOlhMiu ^= ( $aQUp = $ePVzy ) ) { for ( $zNNczEefM ; $oLNLpnrz ; 0x16 ) ; } } for ( shape ( 'single string' => ( await clone $uP = ( $cQ ++ ) [ ] ) ) ; ; ) switch ( + ( bool ) ( ( $qKO instanceof $hBcbcZyUh ) ) ) { default : ; ; default : while ( "nowdoc" ) ; } while ( ( ( float ) ( ~ ( string ) $qQxVOWJo = ( $gUDUAuMao = await $jJAv = @ $cOyhdn = function ( ) : fRWF { throw $iRtJK = ( $kFrHcycU ++ ) ; do ; while ( 0x16 ) ; ; ; } ) ) ) ) do try { } catch ( void $nWf ) { } catch ( cIlpvSe $zVp ) { } catch ( float $lHuVCa ) { } while ( ( ( ( new $uZGXSARgB ( ) ( ) -> eRsybLhs ) instanceof tWAcVpnzY ) ) ) ; } while ( ( shape ( ) ) ) ; foreach ( ( string ) ( ( ( ( await $yGbN -= ( $cEMgBbKah >>= "nowdoc" ) ) instanceof $hOU ) ) ) == ( ( ( 0x16 instanceof $fX ) ) ) as list ( $pBXJraoQa ) ) break ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_100_1323266_0.txt
<?hh << jKVc , lJ , rOzBK , wFcU ( ( ( $pPFILBx instanceof $lASENsD ) ) , ( ~ ( float ) "double string" ) ) , zMJ , yQzcK ( ) , eQ ( ) , wVV ( ) , qWBjvqUPr >> class sGwAgeJa < + oErmoWns as ( function ( ) : tG ) > implements nCCwV < jScvcBak > { use lOyTkYT < string , nBToMHWw , int , uNXIdGqOe , ( function ( eMH , ( function ( ) : mixed ) ) : shape ( ) ) , ( shape ( ) , shape ( ) , array < this > ) > , oH , aJh < gFEkofvQ , ( function ( mixed , arraykey , void ) : resource ) > ; use wHI ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_100_1323266_1.txt
<?hh << cTptLKr , hIDFHYdPe ( ) , uZVZumDSt >> class mX < + tJaJP as ( function ( yWL < ( function ( shape ( ) , num , ( function ( ) : vMbKfVumy ) ) : shape ( 'single string' => arraykey , 'single string' => array < array < classname < yEj > , this :: xV :: sZVbHMxr > > ) ) > ) : mixed ) > implements tQoYyr < array < float > > , eAGdicI < aQhQVOwaQ , ? aGI , array < this > , aR , resource > , lPAAKcP < ( function ( ) : classname < zHr > ) > { }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_100_2465402_0.txt
<?hh << iAstQXMX ( ) , oC ( ~ ( float ) $zYsQ -= ( $vGny ++ ) ) , vE ( array ( ( function ( $uSeUaZDY = $wG = function ( << kOK >> mOXJXyHYQ $tH = 'single string' ) : shape ( 'single string' => this , 'single string' => num , 'single string' => classname < kFOgJhy > ) { ; } ) { } ) , $yWjABekB => 'single string' , ( $tCWqV ++ ) ( ( int ) ( $eRrmkHcm ++ ) ) => 0x16 , ) ) , sGoCkJ ( ( ( ( $zS -- ) ) ) << ( ( ! ( int ) function ( ) : aZATOtkb use ( $jJuMvj ) { { } } ) ) ) >> class gDrKy < rX , + fJden > extends kOSBD implements pZuvSIdM { use gQULPze < vNSUS , jENOsLtrw > ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_100_2465402_1.txt
<?hh trait yCZI < - fMptQQg , - oJPur as shape ( ) , bPOA as mixed > implements rCzkhy < gGddklj > , xUksKS , gFsCNg , xOreFZ { use cBVXzkFYe < aRRYS > ; use yCnhLBR , iOQT < this :: kKjbuT > , hLNqd < ( ( function ( void ) : ( this :: kPP , aGtmZTrJY , shape ( 'single string' => iBQuWvp < gE , string > ) ) ) , array < uR < dGhnZbcq > > , ( function ( ) : array < classname < oUkPhBugp > > ) ) , cK > , nOWIGLe < hD , pXOa , rMfcGIg , mixed > ; use pLhq , wHGWS < vYktftzz > ; require extends fNnimkVy ; }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_100_4263058_0.txt
<?hh namespace zDWVQ { trait iZtmGV < - fYapNdURn , tDkit as int , + sUTUUGQg as array < classname < sF > > > { use wRskBEX < sOJByN > , dAoBR < vWKCKH :: qQLs , rT , ( function ( ) : bB < ? nMl :: xIGfZXS > ) > ; } type vHs = ( function ( string ) : nVKjcqG < aT < void , qWEPIf , uIsO < string > , lTNRFUWkI < rVLtAGyty > , rXYua :: rHmuCxckI :: dQ > , cEdLoFr , shape ( ) > ) ; trait mUsa < pUkxn as mixed , rFQsoNSM , lSjae as bool > { use jGaR < pNdH > , sJT , fHNVvacra < bool , rQ < oIAi > , jFkEN > , jJgFYb , sUPfzI , hFhCnKHbf , rMtb ; } }
Text
hhvm/hphp/hack/test/full_fidelity/perf_cases/test_100_4263058_1.txt
<?hh newtype eHSIRS as ( shape ( 'single string' => classname < pYXZwAWz > , 'single string' => num , 'single string' => mixed ) , ( shape ( 'single string' => bool , 'single string' => qIsRhMJS < mixed > , 'single string' => this ) , ( function ( wIkElUkkZ ) : rFWumkziB < arraykey > ) , ( function ( ) : classname < kCGAr > ) , ( ? float , arraykey ) , this , array < string , ? void > , shape ( 'single string' => mixed , 'single string' => arraykey , 'single string' => shape ( ) ) , void , vZft < arraykey > ) ) = resource ;