Parse error: parse error, expecting `T_PAAMAYIM_NEKUDOTAYIM’

I just got this error.  After doing some googling I found an explanation in Wikipedia:

In PHP, the scope resolution operator is also called Paamayim Nekudotayim, which means “twice colon” or “double colon” in Hebrew. It may be helpful to note that in some cases this error may occur when the $ symbol is not included in the use of a variable.

The name was introduced in the Israeli-developed[1] Zend Engine 0.5 used in PHP 3. Although it has been confusing to many developers, it is still being used in PHP 5″

However it was not the case, as my code did not have any double colons (::) just as the second line of explanation says. The error message was pointing to the line:


foreach ($this->databases AS database)

As you can see this is wrong and it should be:


foreach ($this->databases AS $database)

($ added before word “database”).

So I am posting it here in case someone might need it.

This entry was posted on Sunday, March 7th, 2010 at 6:02 pm and is filed under Other, PHP. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “Parse error: parse error, expecting `T_PAAMAYIM_NEKUDOTAYIM’”

  1. Anders Says:

    I have just got a blog and use about 50 different plugins. Thank you very much for your plugin. It complete my website

  2. Builder Says:

    Many thanks for this post and description. you saved me :)

Leave a Reply

 
TopOfBlogs Web Development & Design Blogs