#51136 [Opn->Bgs]: The result expected to be the same!

From: Date: Wed, 24 Feb 2010 21:47:53 +0000
Subject: #51136 [Opn->Bgs]: The result expected to be the same!
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-148034@lists.php.net to get a copy of this message
ID: 51136 User updated by: laryk17 at gmail dot com Reported By: laryk17 at gmail dot com -Status: Open +Status: Bogus Bug Type: XML related Operating System: win 7 PHP Version: 5.2SVN-2010-02-24 (snap) New Comment: Sorry my mistake. Previous Comments: ------------------------------------------------------------------------ [2010-02-24 21:27:52] laryk17 at gmail dot com Description: ------------ First of all: phpinfo(); says "PHP Version 5.2.4". The problem is I get different results of as I think the same ideologically code. Reproduce code: --------------- 1) <?php function handler(){ print('hello'); } $old_han = set_error_handler('handler'); try { $xslDom = DOMImplementation::createDocument(); } catch (Exception $e) { echo "<pre>", $e, "</pre>"; } ?> 2) <?php try { $xslDom = DOMImplementation::createDocument(); } catch (Exception $e) { echo "<pre>", $e, "</pre>"; } function handler(){ print('hello'); } $old_han = set_error_handler('handler'); ?> Expected result: ---------------- The result expected to be the same. I mean no "hello" print! Actual result: -------------- 1) hello 2) blank page ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51136&edit=1

« previous php.bugs (#148034) next »