php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #60408
Patch const_dereference_002.phpt revision 2011-11-30 09:46 UTC by laruence@php.net
Patch const_dereference_003.phpt revision 2011-11-30 09:46 UTC by laruence@php.net
Patch const_dereference_001.phpt revision 2011-11-30 09:46 UTC by laruence@php.net
Patch req60408.patch revision 2011-11-30 09:45 UTC by laruence@php.net

Patch const_dereference_001.phpt for Scripting Engine problem Bug #60408

Patch version 2011-11-30 09:46 UTC

Return to Bug #60408 | Download this patch
Patch Revisions:

Developer: laruence@php.net

--TEST--
Const array deference
--FILE--
<?php
error_reporting(E_ALL);

var_dump(array(1, 2, 3, 4,) [3]);
var_dump(array(1, 2, 3, 4,) ['foo']);
var_dump(array(array(1,2,3), array(4, 5, 6))[1][2]);

foreach (array(array(1, 2, 3))[0] as $var) {
     echo $var;
}
?>
--EXPECTF--
int(4)

Notice: Undefined index: foo in %sconst_dereference_001.php on line %d
NULL
int(6)
123
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 21:01:55 2014 UTC