mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +08:00
22 lines
447 B
PHP
22 lines
447 B
PHP
--TEST--
|
|
Comparison of a recursive array throws a catchable error
|
|
--FILE--
|
|
<?php
|
|
$a = [&$a];
|
|
try {
|
|
$a === [[]];
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
try {
|
|
[[]] === $a;
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
var_dump($a === $a);
|
|
?>
|
|
--EXPECT--
|
|
Error: Nesting level too deep - recursive dependency?
|
|
Error: Nesting level too deep - recursive dependency?
|
|
bool(true)
|