mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
0a5b7c81b7
This was deprecated in PHP 7.4.
23 lines
307 B
PHP
23 lines
307 B
PHP
--TEST--
|
|
Allowed nested ternary cases
|
|
--FILE--
|
|
<?php
|
|
|
|
(1 ? 2 : 3) ? 4 : 5; // ok
|
|
1 ? 2 : (3 ? 4 : 5); // ok
|
|
|
|
1 ?: 2 ?: 3; // ok
|
|
(1 ?: 2) ?: 3; // ok
|
|
1 ?: (2 ?: 3); // ok
|
|
|
|
(1 ?: 2) ? 3 : 4; // ok
|
|
1 ?: (2 ? 3 : 4); // ok
|
|
|
|
(1 ? 2 : 3) ?: 4; // ok
|
|
1 ? 2 : (3 ?: 4); // ok
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|