summaryrefslogtreecommitdiff
path: root/Zend/tests/this_in_mb_parse_str.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/this_in_mb_parse_str.phpt')
-rw-r--r--Zend/tests/this_in_mb_parse_str.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/this_in_mb_parse_str.phpt b/Zend/tests/this_in_mb_parse_str.phpt
new file mode 100644
index 0000000000..8dfac94722
--- /dev/null
+++ b/Zend/tests/this_in_mb_parse_str.phpt
@@ -0,0 +1,19 @@
+--TEST--
+$this re-assign in mb_parse_str()
+--SKIPIF--
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
+--FILE--
+<?php
+function foo() {
+ mb_parse_str("this=42");
+ var_dump($this);
+}
+foo();
+?>
+--EXPECTF--
+Fatal error: Uncaught Error: Cannot re-assign $this in %sthis_in_mb_parse_str.php:3
+Stack trace:
+#0 %sthis_in_mb_parse_str.php(3): mb_parse_str('this=42')
+#1 %sthis_in_mb_parse_str.php(6): foo()
+#2 {main}
+ thrown in %sthis_in_mb_parse_str.php on line 3