--TEST-- PHP 7.0 test. --RULESET-- { "@Symfony": true, "ordered_imports": true, "random_api_migration": true, "visibility_required": {"elements": ["property", "method"]} } --EXPECT-- $b; // isset ternary echo $a ?? $b; // new random generator echo mt_rand(0, 1); // uniform variable syntax $a = ['b' => 'c']; $c = 'Next step !'; echo ${$a['b']}; // uniform variable syntax on function $this->getFnc()(); } // scalar typehinting public function bar1(int $a): string { } // scalar typehinting public function bar2(int $a): string { } public function getFnc1() { return function () { echo 1; }; } public function getFnc2() { return function () { echo 1; }; } public function gen1() { yield 1; // generator delegation yield from $this->gen2(); } public function gen2() { yield 2; } } // anonymous class $message = (new class {}); $message = (new class implements FooInterface {}); if (1) { $message = (new class extends Foo { public function bar() { echo 1; } }); } // unicode escape echo "\u{26C4}"; --INPUT-- $b; // isset ternary echo $a??$b; // new random generator echo rand(0, 1); // uniform variable syntax $a = array('b' => 'c'); $c = 'Next step !'; echo ${$a['b']}; // uniform variable syntax on function $this->getFnc()(); } // scalar typehinting public function bar1(int $a):string{} // scalar typehinting public function bar2(int $a) : string{} public function getFnc1() { return function () { echo 1; }; } public function getFnc2() { return function () { echo 1; }; } public function gen1() { yield 1; // generator delegation yield FROM $this->gen2(); } public function gen2() { yield 2; } } // anonymous class $message = (new class {}); $message = (new class() implements FooInterface {}); if (1) { $message = (new class() extends Foo{ public function bar() { echo 1; } }); } // unicode escape echo "\u{26C4}";