Re: Programming question
| From: | George Schlossnagle | Date: | Thu, 02 Aug 2001 17:22:33 +0000 |
| Subject: | Re: Programming question | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-61850@lists.php.net to get a copy of this message | ||
> > It seem sto me that there are ways of accomplishing this that allow for
this
> > without breaking compatibility of that string with standard string
> > functions, for exampla an ANSI-like standard prohibiting userland
functions
> > begnning with __ or using a non-null, low ascii character (say 0x07).
>
> agreed, but php has been binary-safe for a looong time. and
> \0 is the most obvious thing to embed and show anybody (who
> reads the c-code) that this is only to-be used internally.
I guess, but it means that it is unsafe to use the common string functions
on function names in the function_table. There are valid reasons to
directly access function_table in php extensions, so why severely limit the
library functions you can use to manipulate function names? It just seems
to me that while it may make it obvious that it's for internal use, there
are better ways of doing it that still allow you to treat a string as a
string in c.
>
> tc
>