Re: ++ bug or unexpected behaviour

From: Date: Sat, 10 Jun 2000 16:24:58 +0000
Subject: Re: ++ bug or unexpected behaviour
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-20929@lists.php.net to get a copy of this message
On Sat, Jun 10, 2000 at 07:18:01PM +0300, Zeev Suraski wrote: > On Sat, 10 Jun 2000, waldschrott wrote: > > > I think "$t++" and "$t=$t+1" should produces the same results, > > shouldn´t > > they? > > No. ++ means increment, while not changing type. $foo+1 means an > arithmetic addition of one, which always results in a conversion to a > number. Is NULL not it's own type? ;)) [NULL++ results in (int) 1] -Jade. -- =============================================================================== Jade Nicoletti Nicoletti Net Services Tel. 01 240 4774 Geschäftsleitung Postfach 2519 Fax 01 240 4775 System-Administration 8021 Zürich ============================================[ Weitere Infos: http://nns.ch/ ]==

« previous php.dev (#20929) next »