#42816 [Opn]: [PATCH] Add support for core and magic constants to error.php

From: Date: Sat, 29 Nov 2008 16:40:25 +0000
Subject: #42816 [Opn]: [PATCH] Add support for core and magic constants to error.php
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-3161@lists.php.net to get a copy of this message
ID: 42816 Updated by: kalle@php.net Reported By: aharvey@php.net Status: Open Bug Type: Website problem Operating System: Irrelevant PHP Version: Irrelevant New Comment: Couldn't PhD perhaps generate a file with core/standard constants for each time the manual is pushed to the mirrors? Previous Comments: ------------------------------------------------------------------------ [2007-10-10 11:40:48] bjori@php.net I love the idea, but I really don't want _all_ the constants listed in the error handler - and needing to update the error handler on every new constant... I however can't come up with better way.. ------------------------------------------------------------------------ [2007-10-01 16:44:59] aharvey@php.net Description: ------------ The (extremely useful) php.net/$keyword redirect currently doesn't support the array of pre-defined constants available within PHP. This is an extra problem because the manual search typically doesn't return relevant results for many of them: as an example, try <http://php.net/PHP_EOL> -- the right place to go would be <http://php.net/reserved.constants>, but that's not in the list. I've concocted a patch for error.php to add support for the "core predefined constants" and the magic constants (including __NAMESPACE__, since it looks like we'll be getting that one soon enough), and it's at <http://www.adamharvey.name/stuff/error-constants.diff>. Hard-coding the constants into the manual page moves array probably isn't the best approach, but there's going to need to be an evil-looking list somewhere, I guess. This patch doesn't address the longer list of "standard predefined constants", but it's a start. If the approach is acceptable (or a better one is recommended), I'll look at cooking up a patch for those as well. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42816&edit=1

« previous php.webmaster (#3161) next »