php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53205 Make $php_errormsg global
Submitted: 2010-10-30 13:37 UTC Modified: 2010-11-02 03:54 UTC
From: info at fedushin dot ru Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.3.3 OS:
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: info at fedushin dot ru
New email:
PHP Version: OS:

 

 [2010-10-30 13:37 UTC] info at fedushin dot ru
Description:
------------
$php_errormsg would be much more useful for developers if it were available in global scope.
F.e. its value might be displayed in user-defined assert handler set by assert_options(ASSERT_CALLBACK,..).

Suggestion is to add boolean variable "track_errors_global" to php.ini.
If it's "On" $php_errormsg should be available in global scope (or maybe even be "super-global").


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-02 03:54 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2010-11-02 03:54 UTC] aharvey@php.net
Given that $php_errormsg and track_errors are leftovers from PHP 3, I don't think there's much likelihood of them receiving any changes at this point. (Honestly, I'd rather just see them removed.)

At any rate, you can emulate this easily enough in a PHP script by setting a global variable within a custom error handler. No need for another configuration option or a global variable to clutter up the global namespace.

Closing won't fix.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 08:01:34 2025 UTC