summaryrefslogtreecommitdiff
path: root/tests/lang/bug22592.phpt
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-01-07 21:51:34 +0100
committerGeorge Peter Banyard <girgias@php.net>2020-01-07 21:54:42 +0100
commitbfe3f934a37ec7e2abcef286294e52abab3e844a (patch)
tree3cd3e8a206a869a0a6abda6fb30f6782a30eeb7e /tests/lang/bug22592.phpt
parentb8609e2fa768c141b2a281fada712e9ccda4246a (diff)
downloadphp-git-bfe3f934a37ec7e2abcef286294e52abab3e844a.tar.gz
Add warning and convert to exception in string offset assignment:
Convert the empty string assignment to an Error as per RFC [1] Add a warning that only the first byte will be assigned to the offset if provided a needle that is longer than one byte. [1] https://wiki.php.net/rfc/engine_warnings
Diffstat (limited to 'tests/lang/bug22592.phpt')
-rw-r--r--tests/lang/bug22592.phpt2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/lang/bug22592.phpt b/tests/lang/bug22592.phpt
index 4614efc169..6999c0bccf 100644
--- a/tests/lang/bug22592.phpt
+++ b/tests/lang/bug22592.phpt
@@ -39,9 +39,11 @@ var_dump($result);
string(5) "* *-*"
string(7) "* *-* *"
string(7) "*4*-* *"
+[Only the first byte will be assigned to the string offset]
string(7) "*4*s* *"
string(8) "*4*s* *0"
string(8) "*-*-* *0"
+[Only the first byte will be assigned to the string offset]
string(8) "*-*s*s*0"
string(8) "4-4s4s*0"
string(9) "4-4s4s505"