source: src/router/php7/Zend/tests/list_keyed_evaluation_order_3.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 387 bytes
Line 
1--TEST--
2list() with keys, evaluation order #3
3--FILE--
4<?php
5
6$i = 0;
7$a = [
8    0 => [
9        'b' => 'bar',
10        'a' => 'foo',
11    ],
12    1 => 'a',
13    3 => 'b',
14];
15list($a[$i++] => $a[$i++], $a[$i++] => $a[$i++]) = $a[$i++];
16var_dump($i); // should be 5
17var_dump($a[2]); // should be 'foo'
18var_dump($a[4]); // should be 'bar'
19
20?>
21--EXPECT--
22int(5)
23string(3) "foo"
24string(3) "bar"
Note: See TracBrowser for help on using the repository browser.