1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Files
archived-php-src/Zend/tests/const_dereference_002.phpt
T
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

19 lines
328 B
PHP

--TEST--
Const string dereference
--FILE--
<?php
error_reporting(E_ALL);
var_dump("foobar"[3]);
var_dump("foobar"[2][0]);
var_dump("foobar"["0foo"]["0bar"]);
?>
--EXPECTF--
string(1) "b"
string(1) "o"
Warning: Illegal string offset "0foo" in %s on line %d
Warning: Illegal string offset "0bar" in %s on line %d
string(1) "f"