#28854 [Com]: Class and Vars

From: Date: Mon, 21 Jun 2004 21:43:43 +0000
Subject: #28854 [Com]: Class and Vars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-61180@lists.php.net to get a copy of this message
ID: 28854 Comment by: rodolfo at rodsoft dot org Reported By: toppi at kacke dot de Status: Open Bug Type: *General Issues Operating System: linux/unix PHP Version: 5.0.0RC3 New Comment: The correct way to declare the member variables would be: var $a. This way, your example would be: class a { var $a; var $b; var $a; } which would give the correct fatal error: Fatal error: Cannot redeclare a::$a in /var/www/htdocs/tst.php on line 5 Previous Comments: ------------------------------------------------------------------------ [2004-06-20 16:27:55] toppi at kacke dot de Description: ------------ Class and Vars Declare a var twice Script breaks without error when including Reproduce code: --------------- class a { var a; var b; var a; function a(){ // } } Expected result: ---------------- any warning/error Actual result: -------------- script ends/break regular @ including-point ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28854&edit=1

« previous php.bugs (#61180) next »