You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: test.php: SyntaxError: ParseError : syntax error, unexpected 'print' (T_PRINT) on line 549Error: 549 | $unit = $unitNode?->print($context);
Expected behavior:
It seems that print is the culprit. I would expect that I can call a print method the same way any other method with the conditional chaining before. This code seems to work in contrast:
$unit = $unitNode?->test($context);
The text was updated successfully, but these errors were encountered:
jaulz
changed the title
?->print not working?->print() not working
Oct 15, 2024
Prettier 3.0.3
PHP Plugin 0.22.2
Input:
Output:
Expected behavior:
It seems that
print
is the culprit. I would expect that I can call aprint
method the same way any other method with the conditional chaining before. This code seems to work in contrast:The text was updated successfully, but these errors were encountered: