Re: I a list of PHP 5 reserved words please!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sonia Desbiens wrote:

I have a few clients that have upgraded to PHP 5 for development projects and I am running into problems with class object naming for all my classes and COM objects that use.... '$this->'

$this = new COM ( 'ibmTransate.Server' );

$this->MimeType = 'text/' . ( $key->type == '1' ? 'text' : 'html' );

PHP Fatal error:  Cannot re-assign $this in
j:\www\docs\www\sys\lib\functions.php on line 2189

I have been using '$this->' for a long time in 1000's of projects that I
have worked on and sold! This really worries me because I will have to spend
many hours changing '$this->' in all my class files and scripts that use
this + I will have to contact each client and fix this, this will involved
more time because many projects are encoded.

I would have never thought that a common word as 'this' would be labeled as
a 'PHP' reserved word! Anyway could you please post a list of all words that
will be deemed 'reserved' in PHP 5!

Hi Sonia,


You have a quick view for the changes in http://www.php.net/zend-engine-2.php

But you will see that $this-> is not a change. $this has been a reserved word in PHP 4, so it is not a new reserved word. $this is ALREADY a reserved word and you shouldn't be using it the way you are.

I think a hard work is waiting for you to fix it...

Regards,
Jordi.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux