php-parser/test/code/prettyPrinter/expr/nullsafe.test
2020-08-09 12:08:05 +02:00

22 lines
239 B
Plaintext

Nullsafe operator
-----
<?php
$a?->b;
$a?->b($c);
$a?->b?->c;
$a?->b($c)?->d;
$a?->b($c)();
new $a?->b;
"{$a?->b}";
"$a?->b";
-----
!!php7
$a?->b;
$a?->b($c);
$a?->b?->c;
$a?->b($c)?->d;
$a?->b($c)();
new $a?->b();
"{$a?->b}";
"{$a}?->b";