php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51136 The result expected to be the same!
Submitted: 2010-02-24 21:27 UTC Modified: 2010-02-24 21:47 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: laryk17 at gmail dot com Assigned:
Status: Not a bug Package: XML related
PHP Version: 5.2SVN-2010-02-24 (snap) OS: win 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laryk17 at gmail dot com
New email:
PHP Version: OS:

 

 [2010-02-24 21:27 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-24 21:47 UTC] laryk17 at gmail dot com
Sorry my mistake.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 21:01:34 2025 UTC