|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-24 21:47 UTC] laryk17 at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 19:00:01 2025 UTC |
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