1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/Zend/tests/concat/bug79836_2.phpt

27 lines
347 B
PHP

--TEST--
Bug #79836 (Segfault in concat_function)
--FILE--
<?php
$c = str_repeat("abcd", 10);
ob_start(function () use (&$c) {
$c = 0;
return '';
}, 1);
class X {
function __toString() {
echo "a";
return "abc";
}
}
$xxx = new X;
$x = $c . $xxx;
ob_end_clean();
echo $x . "\n";
?>
--EXPECT--
abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabc