1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 17:22:15 +01:00
Files
archived-php-src/ext/standard/tests/strings/bug54238.phpt
2019-10-02 10:34:08 +02:00

27 lines
417 B
PHP

--TEST--
Bug #54238 (use-after-free in substr_replace())
--FILE--
<?php
$f = array(array('A', 'A'));
$z = substr_replace($f, $f, $f, 1);
var_dump($z, $f);
?>
--EXPECTF--
Warning: Array to string conversion in %s on line %d
Warning: Array to string conversion in %s on line %d
array(1) {
[0]=>
string(9) "AArrayray"
}
array(1) {
[0]=>
array(2) {
[0]=>
string(1) "A"
[1]=>
string(1) "A"
}
}