Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Zend/tests/throw/001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,22 @@ try {
var_dump($e->getMessage());
}

try {
(function () {
return "string" + throw null ?? throw new Exception('return throw null ?? throw new Exception();');
})();
} catch (Exception $e) {
var_dump($e->getMessage());
}

try {
(function () {
return "string1" . 5 . "ok" / throw throw throw throw new Exception("cool");
})();
} catch (Exception $e) {
var_dump($e->getMessage());
}

?>
--EXPECT--
string(13) "true && throw"
Expand All @@ -171,3 +187,5 @@ string(42) "Unsupported operand types: Exception + int"
string(35) "throw $exception = new Exception();"
string(37) "throw $exception ??= new Exception();"
string(30) "throw null ?? new Exception();"
string(43) "return throw null ?? throw new Exception();"
string(4) "cool"