PHP-Parser
PHP-Parser copied to clipboard
Fix bug in pretty printer
Starting from PHP 8, a number of additional expressions and non-expressions can appear on the rhs of an instanceof expression, including a string (appropriately wrapped in parenthesis).
BTW, also added a similar fix for arrow functions, to avoid problems when printing things like fn () => ($a + $b);
This is fixed by https://github.com/nikic/PHP-Parser/commit/1eb6b5653eb7aeb9e12d2bbbaa8b8f698528e0a2 and https://github.com/nikic/PHP-Parser/commit/cc34c2450c50504b7b3aaa36dfd6276eb9be77d8.