History log of /PHP-Parser/test/code/parser/stmt/loop/foreach.test (Results 1 – 8 of 8)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9a5d5c11 20-May-2023 Nikita Popov

Add newline at end of file for many tests

Add the newline in reconstructTest() and run updateTests.php, to
reduce spurious diffs in the future.


# 8be56afd 02-Sep-2022 Nikita Popov

Rename Expr\ArrayItem to ArrayItem

Array items are not expressions by themselves.


Revision tags: v4.3.0, v4.2.5, v4.2.4, v4.2.3, v4.2.2
# 8012faea 09-May-2019 Tomas Votruba

[PHP 7.4] Add array spread


Revision tags: v4.2.1, v4.2.0, v4.1.1, v4.1.0, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4, v4.0.0alpha3, v3.1.3, v4.0.0alpha2, v3.1.2, v4.0.0alpha1, v3.1.1, v3.1.0, v3.0.6, v3.0.5, v3.0.4, v3.0.3, v3.0.2, v3.0.1, v3.0.0, v3.0.0beta2, v3.0.0beta1, v2.1.1, v3.0.0alpha1
# 574665b4 09-Jul-2016 Nikita Popov

PHP 7.1: list() with keys

Expr\List will now contain ArrayItems instead of plain variables.
I'm reusing ArrayItem, because code handling list() must also handle
arrays, and this allo

PHP 7.1: list() with keys

Expr\List will now contain ArrayItems instead of plain variables.
I'm reusing ArrayItem, because code handling list() must also handle
arrays, and this allows both to go through the same code path.

This also renames Expr\List->vars to ->items.

TODO: Should Expr\List be dropped in favor of Expr\Array with an
extra flag?

show more ...


Revision tags: v2.1.0
# a0c216bf 09-Mar-2016 Nikita Popov

Add dumpComments option to NodeDumper

Adding this as an option to avoid breaking people's tests.

Some of the test results show pretty clearly that we are incorrectly
assigning t

Add dumpComments option to NodeDumper

Adding this as an option to avoid breaking people's tests.

Some of the test results show pretty clearly that we are incorrectly
assigning the same comment multiple times for nested nodes (mentioned
in #36).

show more ...


Revision tags: v2.0.1, v2.0.0, v2.0.0beta1, v1.4.1, v2.0.0alpha1, v1.4.0, v1.3.0, v1.2.2, v1.2.1, v1.2.0, v1.1.0, v1.0.2, v1.0.1, v1.0.0, v1.0.0beta2, v0.9.5, v1.0.0beta1
# f5be0d30 22-Mar-2014 nikic

Guarantee that subnodes are always in the right order


Revision tags: v0.9.4, v0.9.3
# f8f1e17e 07-Sep-2012 nikic

Add support for list() in foreach (PHP 5.5)

Example: foreach ($coords as list($x, $y)) { ... }

This change slightly breaks backwards compatability, as it changes the
node struct

Add support for list() in foreach (PHP 5.5)

Example: foreach ($coords as list($x, $y)) { ... }

This change slightly breaks backwards compatability, as it changes the
node structure for the previously existing `list(...) = $foo` assignments.
Those no longer have a dedicated `AssignList` node; instead they are
parsed as a normal `Assign` node with a `List` as `var`. Similarly the
use in `foreach` will generate a `List` for `valueVar`.

show more ...


Revision tags: v0.9.2
# 81e53ce0 11-May-2012 nikic

Insert comments when pretty printing

This changset also adds unit tests for Comments and adds a way to test the
pretty printer.