Re: Re: [PHP4BETA] <?$a="1";$a[0]=1;?> cause mem-block overrun.
| From: | Joey | Date: | Sun, 14 Nov 1999 21:04:10 +0000 |
| Subject: | Re: Re: [PHP4BETA] <?$a="1";$a[0]=1;?> cause mem-block overrun. | ||
| References: | 1 | Groups: | php.dev php.version4 |
| Request: | Send a blank email to php-dev+get-12524@lists.php.net to get a copy of this message | ||
I think moving string offsets to {} is a very good idea. It seems to me
that it would fall under the same category as $a["somevar"] !=
$a[somevar]...ie, the design isssues are important enough that I don't
mind porting my code.
--Joey Smith
On Sun, 14 Nov 1999, Andi Gutmans wrote:
> php-dev people, please read this mail!
>
>
> We support string offsets in PHP 4 for backwards compatibility issues but
> the way they share the same notation with array offsets is "not the right
> thing". It creates ambiguity and is bad design.
> What I'm thinking of doing is separate these two notations before the
> release of PHP 4. Maybe add {} for string offsets so you'd do $a{0} when
> you mean string offset and $a[0] when you mean array offset. We would only
> document {} as string offset support and encourage people to migrate to
> this version. In a few months, maybe with PHP 4.1 we would deprecate the
> old notation so that the language could be correct and unambiguous.
>
> Some people might not like this but it really is the best way to go for
> PHP. Having the core language contain such a bad design issue in it would
> not look good to professionals. If we add this to the release notes of PHP
> 4 telling people to convert to the new syntax it would cause very little
> headaches later on.
>
> Andi
> ---
> Andi Gutmans <andi@zend.com>
> http://www.zend.com/
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>