xref: /PHP-7.4/Zend/tests/bug49866.phpt (revision 6e6280a3)
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 in %sbug49866.php:3
11Stack trace:
12#0 {main}
13  thrown in %sbug49866.php on line 3
14