var was undeprecated on 5.2
On May 22, 12:03 pm, mustan9 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> The var keyword is deprecated in PHP5. The Cake documentation and
> source code constantly use this keyword to define properties for
> classes. The documentation should be changed, and all references to
> var should be replaced with the correct visibility of that member
> variable.
>
> for example;
>
> class MyClass
> {
> var $field;
>
> }
>
> Should be changed to
>
> class MyClass
> {
> protected $field;
>
> }
>
> It's a real pain, because Zend Studio reports all the usages of var is
> a compile warning.
>
> This is what I found in the PHP5 manual.
>
> "The PHP 4 method of declaring a variable with the var keyword is
> still supported for compatibility reasons (as a synonym for the public
> keyword). In PHP 5 before 5.1.3, its usage would generate an E_STRICT
> warning."
>
> My problem with the var usage is that it doesn't correctly define the
> visibility of members variables. Reference the PHP5 manual section
> 19.10.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---