[PHP-DEV] arithmetic operators in member variable assignments From: Sam Leibowitz (sleibowitz <email protected>)
Date: 08/11/00

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 <email protected>)

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>