mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-11 16:49:43 +01:00
53 lines
470 B
Plaintext
53 lines
470 B
Plaintext
|
Comments in arrays and function calls
|
||
|
-----
|
||
|
<?php
|
||
|
|
||
|
$arr = [
|
||
|
// Foo
|
||
|
$foo,
|
||
|
// Bar
|
||
|
$bar,
|
||
|
// Discarded
|
||
|
];
|
||
|
[
|
||
|
// Foo
|
||
|
$foo,
|
||
|
,
|
||
|
// Bar
|
||
|
$bar,
|
||
|
] = $arr;
|
||
|
foo(
|
||
|
// Foo
|
||
|
$foo,
|
||
|
// Bar
|
||
|
$bar
|
||
|
);
|
||
|
new Foo(
|
||
|
// Foo
|
||
|
$foo
|
||
|
);
|
||
|
-----
|
||
|
!!php7
|
||
|
$arr = [
|
||
|
// Foo
|
||
|
$foo,
|
||
|
// Bar
|
||
|
$bar,
|
||
|
];
|
||
|
[
|
||
|
// Foo
|
||
|
$foo,
|
||
|
,
|
||
|
// Bar
|
||
|
$bar,
|
||
|
] = $arr;
|
||
|
foo(
|
||
|
// Foo
|
||
|
$foo,
|
||
|
// Bar
|
||
|
$bar
|
||
|
);
|
||
|
new Foo(
|
||
|
// Foo
|
||
|
$foo
|
||
|
);
|