I'm drowning in PHP

Peter Corlett abuse at cabal.org.uk
Tue May 15 16:07:49 BST 2007

On Tue, May 15, 2007 at 03:17:03PM +0100, Jon Nangle wrote:
> On Tue, May 15, 2007 at 01:16:02PM +0100, Peter Corlett wrote:
>>> Well, it is if strlen($str) is O(N), as it might well be in C for example.
>> Right, because $str is a valid variable name in C...
> #define $str somestring
> :)

The preprocessor has the same rules as the compiler on which characters are
valid in identifiers, so if $str isn't a valid C variable, it's not a valid
preprocessor macro name either.

Regular C doesn't allow $ in identifiers, although gcc supports it as an
extension on some platforms and architectures (of which I suspect VMS would
be one...)

More information about the london.pm mailing list