1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Files
archived-php-src/Zend/tests/const_dereference_002.phpt
2020-07-10 21:05:28 +02:00

18 lines
321 B
PHP

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