source: src/router/php7/Zend/tests/bug71572.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 599 bytes
Line 
1--TEST--
2Bug #71572: String offset assignment from an empty string inserts null byte
3--FILE--
4<?php
5
6$str = "abc";
7var_dump($str{0} = "");
8var_dump($str{1} = "");
9var_dump($str{3} = "");
10var_dump($str{10} = "");
11var_dump($str);
12?>
13==DONE==
14--EXPECTF--
15Warning: Cannot assign an empty string to a string offset in %s on line %d
16NULL
17
18Warning: Cannot assign an empty string to a string offset in %s on line %d
19NULL
20
21Warning: Cannot assign an empty string to a string offset in %s on line %d
22NULL
23
24Warning: Cannot assign an empty string to a string offset in %s on line %d
25NULL
26string(3) "abc"
27==DONE==
Note: See TracBrowser for help on using the repository browser.