By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,718 Members | 1,461 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,718 IT Pros & Developers. It's quick & easy.

funny error

P: n/a
hi,

try this:

<?php
class Test {

function method()
{
echo "hello world";
}

};
$Test::method ();
?>
=> Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in
..../test.php on line 12
I found this on the web:

"I recognize this as a Hebrew phrase:
paamayim means two times
nekudotayim means two punctuations or two vowels
Probably means missing double quotes"

--
Felix Natter
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Felix Natter wrote:
hi,

try this:

<?php
class Test {

function method()
{
echo "hello world";
}

};
$Test::method ();
?>
=> Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in
.../test.php on line 12
I found this on the web:

"I recognize this as a Hebrew phrase:
paamayim means two times
nekudotayim means two punctuations or two vowels
Probably means missing double quotes"


As far as I know PHP doesnt use :: - it uses -> in objets, also, you
have to declare a variable to be the object.

Thus your code should be

<?php
class Test {

function method()
{
echo "hello world";
}

};
$Test = new Test;
$Test->method();
?>

Jul 17 '05 #2

P: n/a
Martin Meredith:
Felix Natter wrote:
hi,

try this:

<?php
class Test {

function method()
{
echo "hello world";
}

};
$Test::method ();
?>
=> Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in
.../test.php on line 12
I found this on the web:

"I recognize this as a Hebrew phrase:
paamayim means two times
nekudotayim means two punctuations or two vowels
Probably means missing double quotes"

It's the :: operator.
As far as I know PHP doesnt use :: - it uses -> in objets, also, you
have to declare a variable to be the object.


The problem here is that he's trying to call a static method, in which case
he shouldn't use the $ as static methods are "class methods". The correct
syntax is:

Test::method();

André Nęss
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.