Open
Description
Description
The following code:
<?php
class Node {
public $next;
}
$first = new Node();
$first->next = $first;
$new = new Node();
$new->next = $new;
var_dump($first == $new);
Resulted in this output:
Fatal error: Nesting level too deep - recursive dependency? in /in/qWtA7 on line 13
But I expected this output instead:
bool(true)
online repro: https://3v4l.org/AZV6v and https://3v4l.org/SttGY
The issue is present also for other "weak comparison operators" like <
.
PHP Version
any