From:             cuervo_4762 at yahoo dot com
Operating system: Linux
PHP version:      5.1.4
PHP Bug Type:     *Compile Issues
Bug description:  Cannot initialize multiline associative array in declaration 
portion of a class

Description:
------------
I cannot seem to initialize a multi-line assoc array in the declaration
part of a class.  The work around I am using is to do it in the
constructor.  If this is the normal behavior it problaly should be stated
in the manual.

thanks
frank

Reproduce code:
---------------
<?php
class RDBMSLoginDataSource {
    
    private $_dsn;
    private $_mdb2 = 2;
    
    private $_sql = array(
'isUserLocked'=>"SELECT users.is_locked FROM users where ".
                "user_name='$user' LOCK IN SHARE MODE",
'userLogin'   =>"SELECT users.user_name,COUNT(*) FROM " .
                "users WHERE users.user_name='$user' && ".
                "users.pass='$pass' GROUP BY " .
                "users.user_name LOCK IN SHARE MODE"
                          );
}

?>

Expected result:
----------------
na

Actual result:
--------------
Parse error: syntax error, unexpected '.', expecting ')' in
/home/fmadero/public_html/classes/RDBMSLoginDataSource.php on line 8


-- 
Edit bug report at http://bugs.php.net/?id=37880&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37880&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37880&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37880&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37880&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37880&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37880&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37880&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37880&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37880&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37880&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37880&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37880&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37880&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37880&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37880&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37880&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37880&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37880&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37880&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37880&r=mysqlcfg

Reply via email to