xref: /PHP-7.0/Zend/tests/bug49866.phpt (revision e97d5fab)
1--TEST--
2Bug #49866 (Making reference on string offsets crashes PHP)
3--FILE--
4<?php
5$a = "string";
6$b = &$a[1];
7$b = "f";
8echo $a;
9--EXPECTF--
10Fatal error: Uncaught Error: Cannot create references to/from string offsets nor overloaded objects in %sbug49866.php:3
11Stack trace:
12#0 {main}
13  thrown in %sbug49866.php on line 3
14