Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Implemented #19874825: Implement the short array syntax introduced …
…with PHP 5.4 [Story19874825 state:finished]
- Loading branch information
1 parent
0d8b3d9
commit 338bca2
Showing
5 changed files
with
117 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/test/resources/files/Parser/VersionAllParser/testParserHandlesRegularArraySyntax.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
class testParserHandlesRegularArraySyntaxClass | ||
{ | ||
function testParserHandlesRegularArraySyntax($x) | ||
{ | ||
return array( | ||
1 => 2, | ||
2 => array( | ||
new stdClass(), | ||
'foo' => &$x, | ||
'bar' => $x, | ||
array( | ||
'a', 'b', 'c', new stdClass() | ||
) | ||
) | ||
); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/test/resources/files/Parser/VersionAllParser/testParserHandlesShortArraySyntax.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
class testParserHandlesShortArraySyntaxClass | ||
{ | ||
function testParserHandlesShortArraySyntax() | ||
{ | ||
return [ | ||
1 => 2, | ||
2 => [ | ||
new stdClass(), | ||
'foo' => &$x, | ||
'bar' => $x, | ||
[ | ||
'a', 'b', 'c', new stdClass() | ||
] | ||
] | ||
]; | ||
} | ||
} |