#36174 [Opn->Csd]: PHP 5 should treat 'var' as 'public'

From: Date: Thu, 26 Jan 2006 21:50:14 +0000
Subject: #36174 [Opn->Csd]: PHP 5 should treat 'var' as 'public'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92531@lists.php.net to get a copy of this message
 ID:               36174
 Updated by:       helly@php.net
 Reported By:      mike at scrapegoat dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: any
 PHP Version:      5.1.2
 New Comment:

That was discussed enough and declined


Previous Comments:
------------------------------------------------------------------------

[2006-01-26 22:30:17] mike at scrapegoat dot com

Description:
------------
I am amazed that PHP5 does not treat 'var' as if it was the same
'public'.

I am so sick of trying to maintain two sets of code for PHP4 and PHP5
all because PHP4 uses 'var' in my classes and PHP5 wants 'public',
'private' or 'protected'

I would love to see 'var' be treated an alias for 'public'

Reproduce code:
---------------
class test
{
	var $info;

	function test( $info )
	{
		$this->info = $info;
	}
}

Expected result:
----------------
This should be the same as:
class test
{
	public $info;

	function test( $info )
	{
		$this->info = $info;
	}
}

Actual result:
--------------
error/exception is thrown


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36174&edit=1


Thread (4 messages)

« previous php.bugs (#92531) next »