xref: /PHP-8.1/Zend/tests/bug79783.phpt (revision 25f1c405)
1--TEST--
2Bug #79783: Segfault in php_str_replace_common
3--FILE--
4<?php
5str_replace("a", "b", "c", strlen("d"));
6?>
7--EXPECTF--
8Fatal error: Uncaught Error: str_replace(): Argument #4 ($count) cannot be passed by reference in %s:%d
9Stack trace:
10#0 {main}
11  thrown in %s on line %d
12