Difference between revisions of "PHP"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
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

Computing: Software: PHP

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

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.