arithmetic operators in member variable assignments

From: Date: Fri, 11 Aug 2000 14:20:46 +0000
Subject: arithmetic operators in member variable assignments
Groups: php.dev 
Request: Send a blank email to php-dev+get-28608@lists.php.net to get a copy of this message
Apologies in advance if this is a known issue, or if I'm about to say something really dumb. On an upgrade of one of my web servers from Apache 1.3.6 & PHP 3.x to Apache 1.3.12 & PHP 4.1pl2, a script I'd been using to handle user authorization unexpectedly developed a parse error. The line in question occurred inside an object: var $lifetime = 24 * 60 * 60; Changing the line to the following fixed the problem: var $lifetime = 84600; Upon experimentation, I was able to reproduce the error reliably with the following code: <? class thing { var $member = 12 * 12; } ?> That produces a parse error (expecting "," or ";"). Either I've gone completely brain dead and am missing something obvious, or that's a real problem. Since the former is a real possibility, I'm mailing the list before opening a bug report. Specs: conf command: ./configure' '--with-mysql' '--with-postgresql' '--with-apxs=/usr/local/apache/bin/apxs' Apache/1.3.12 Running RedHat 6.2 Many thanks, Sam Leibowitz (sleibowitz@btcwcu.org)

« previous php.dev (#28608) next »