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
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-24 21:47 UTC] laryk17 at gmail dot com
Sorry my mistake.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jan 26 23:01:24 2021 UTC