From: hightman at hightman dot net
Operating system: FreeBSD
PHP version: 4.3.1
PHP Bug Type: Output Control
Bug description: problem using create_function() as output_callback argument to
ob_start()
Test enviroment:
apache 1.3.27, PHP 4.3.1 built as apache module
The following two programs demonstrates the difference:
<?
$foo = create_function('$s', 'return strtoupper($s);');
ob_start($foo);
echo $foo("Bar\n");
echo "Hello, the World!";
?>
Our expectation is that all characters was upper,
Unfortunately, "Helo, the World!" was not changed.
It seems that the $foo function had not been called.
I have ever running with php 4.2.1, It works well.
When I change a little about the source, it works well, too.
<?
function foo ($s) {
return strtoupper($s);
}
$foo = "foo";
ob_start($foo);
echo $foo("Bar\n");
echo "Hello, the World!";
?>
--
Edit bug report at http://bugs.php.net/?id=22690&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22690&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22690&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22690&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22690&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22690&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22690&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22690&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22690&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22690&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22690&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22690&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22690&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22690&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22690&r=gnused