ID: 36174
Updated by: [EMAIL PROTECTED]
Reported By: mike at scrapegoat dot com
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: any
PHP Version: 5.1.2
New Comment:
It's just an E_STRICT warning which you very easily can turn off.
Previous Comments:
------------------------------------------------------------------------
[2006-01-26 23:18:30] mike at scrapegoat dot com
You have got to be kidding!
This was declined?!?!
I have a HUGE codebase that I need to maintain in both PHP4 and PHP5.
In almost all cases the ONLY difference I have is the fact that I must
change 'var' to 'public' and back again.
So what you are telling me is that I MUST maintain 2 sets of code when
the only difference is var and public?
I have to make code fixed in TWO sets of code because you don't want to
provide a USEFULL correction to the language?
What a joke!
This is such a simple thing to add. All it needs to be is an alias and
then my code and hundreds if not thousands of developers lives would be
eaiser and conversion from PHP4 to PHP5 would be more enticing to
others.
PLEASE!!!! Please rethink this. This is such a small change and will
have such a HUGE impact on developers!!!
------------------------------------------------------------------------
[2006-01-26 22:50:13] [EMAIL PROTECTED]
That was discussed enough and declined
------------------------------------------------------------------------
[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