tags:

views:

57

answers:

1
+1  Q: 

Php syntax error

Hello, here is my error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home3/*/www/modules/mysql_worker.php on line 9

Here is file mysql_worker.php http://pastie.org/697284

+7  A: 

You are using PHP5 code on a PHP4 system.

Consider upgrading to PHP5. PHP4 is outdated.

Pekka
And what exactly PHP5 doesn't provide in my code?
Ockonal
The "Private" and "public" keywords. Advanced OOP.
Pekka
Ockonal, it seems your machine is running PHP4. The code is for php5. In php4, "private" is not a keyword, hence the error.
gnud
public, private and protected are new in PHP5
Colin Pickard
Okay, thank you.
Ockonal