Re: Programming question
| From: | Thies C. Arntzen | Date: | Thu, 02 Aug 2001 17:12:31 +0000 |
| Subject: | Re: Programming question | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-61848@lists.php.net to get a copy of this message | ||
On Thu, Aug 02, 2001 at 01:01:43PM -0400, George Schlossnagle
wrote:
>
> > On Thu, Aug 02, 2001 at 12:24:03PM -0400, George Schlossnagle
> > wrote:
> > > On a related note, placing null-bytes in the middle of strings
> > > (for example
> > > in the names of the so-called lambda_functions generated from
> > > create_function()) seems like a pretty questionable practice.
> >
> > why, this makes sure that function-names generated by
> > create_function() will never clash with userland code.
> > i think that makes perfect sense.
>
> 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.
tc