mirror of
https://github.com/php/php-src.git
synced 2026-04-28 10:43:30 +02:00
a555cc0b3d
Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
26 lines
582 B
PHP
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"
|