|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-03-28 11:48 UTC] grzegorz129 at gmail dot com
Description:
------------
I've trying to catch E_PARSE but trying to run sample code results only in
segfault.
Test script:
---------------
<?php
ob_start('phpErrorHandler');
function phpErrorHandler($output) {
ob_end_clean();
echo "abc";
die("def");
}
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 13:00:01 2025 UTC |
Test script can be even simplier: <?php ob_start('foo'); function foo() { ob_end_clean(); } ?>-------- [yohgaki@dev php-src]$ cat t.php <?php ob_start('foo'); function foo() { ob_end_clean(); } ?> ------- This kind of code worked since the output buffer was introduced. i.e. Works from PHP 4.0. It seems PHP5.4+ has newer API, but it just raise fatal error. I was surprised now it's not working, so I'll fix this. ------- [yohgaki@dev php-src]$ php -v PHP 5.4.1RC1-dev (cli) (built: Mar 22 2012 17:06:46) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies [yohgaki@dev php-src]$ php t.php Fatal error: ob_end_clean(): Cannot use output buffering in output buffering display handlers in /home/yohgaki/ext/git/oss/php.net/php-src/t.php on line 3 -------