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

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

update php

File size: 336 bytes
Line 
1--TEST--
2list() with both keyed and unkeyed elements
3--FILE--
4<?php
5
6$contrivedKeyedAndUnkeyedArrayExample = [
7    0,
8    1 => 1,
9    "foo" => "bar"
10];
11
12list($zero, 1 => $one, "foo" => $foo) = $contrivedKeyedAndUnkeyedArrayExample;
13
14?>
15--EXPECTF--
16Fatal error: Cannot mix keyed and unkeyed array entries in assignments in %s on line %d
Note: See TracBrowser for help on using the repository browser.