Difference between revisions of "PHP"
Jump to navigation
Jump to search
(→Links: notes: lack of "use strict") |
(→Notes: REG_ERANGE) |
||
Line 22: | Line 22: | ||
==Notes== | ==Notes== | ||
One of the major weaknesses of PHP as a serious programming language is its lack of any way to require variable declaration before usage -- the equivalent of "use strict;" in [[Perl]] or "Option Explicit" in [[Visual Basic]]. [http://www.wellho.net/forum/Writing-PHP/use-strict.html Here] is a brief discussion of this problem, with a workaround which might be useful in some situations (but not if you need to turn off warnings for other reasons, such as needing to suppress messages about duplicate http headers). | One of the major weaknesses of PHP as a serious programming language is its lack of any way to require variable declaration before usage -- the equivalent of "use strict;" in [[Perl]] or "Option Explicit" in [[Visual Basic]]. [http://www.wellho.net/forum/Writing-PHP/use-strict.html Here] is a brief discussion of this problem, with a workaround which might be useful in some situations (but not if you need to turn off warnings for other reasons, such as needing to suppress messages about duplicate http headers). | ||
+ | ===Error Messages=== | ||
+ | ''some of these are not found in the PHP documentation'' | ||
+ | * '''REG_ERANGE''': This error appears to originate in the [[regex]] library, and means "Invalid character range, e.g. ending point is earlier in the collating order than the starting point." | ||
+ | ** In one case, this was caused by having a forward-slash ("/") in the bracketed list of possible characters; escaping the forward slash fixed the problem. |
Revision as of 15:21, 30 September 2007
This page is a seed article. You can help HTYP water it: make a request to expand a given page and/or donate to help give us more writing-hours!
|
PHP is an interpreted language most commonly used in web sites.
Reference
Related Articles
Related Things
Coding Resources
Users Groups
Links
- 2006-07-22 Why Global Variables in PHP is Bad Programming Practice
- Experiences of Using PHP in Large Websites
- un-PHP-ing my web site: a LiveJournal entry critical of PHP
Notes
One of the major weaknesses of PHP as a serious programming language is its lack of any way to require variable declaration before usage -- the equivalent of "use strict;" in Perl or "Option Explicit" in Visual Basic. Here is a brief discussion of this problem, with a workaround which might be useful in some situations (but not if you need to turn off warnings for other reasons, such as needing to suppress messages about duplicate http headers).
Error Messages
some of these are not found in the PHP documentation
- REG_ERANGE: This error appears to originate in the regex library, and means "Invalid character range, e.g. ending point is earlier in the collating order than the starting point."
- In one case, this was caused by having a forward-slash ("/") in the bracketed list of possible characters; escaping the forward slash fixed the problem.