1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00
Files
archived-php-src/Zend/tests/bug71572.phpt
T
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

26 lines
582 B
PHP

--TEST--
Bug #71572: String offset assignment from an empty string inserts null byte
--FILE--
<?php
$str = "abc";
var_dump($str[0] = "");
var_dump($str[1] = "");
var_dump($str[3] = "");
var_dump($str[10] = "");
var_dump($str);
?>
--EXPECTF--
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
Warning: Cannot assign an empty string to a string offset in %s on line %d
NULL
string(3) "abc"