parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';'
Posted April 22nd, 2008 by TiVoShane
I receive this error on the following line of PHP/Javascript code:
if (elById('<?=$tb->getHoursBox()->getID();?>').value != '')$tb is a PHP object that contains an hours box. The "hours box" is another object so the code is perfectly legal. It parses just fine outside of VS.php.
In order to fix this I end up having to do this:
if (elById('<? $t = $tb->getHoursBox(); print $t->getID();?>').value != '')Is there something else I can do to get around this because it's not really an error....?
Any help is appreciated.


I had PHP4 enabled. I
I had PHP4 enabled. I enabled PHP5 and I no longer get this error.
However, I can no longer debug. I end up getting internal server errors now and haven't been able to get past that yet. Very frustrating..... :-(
Shane Miller
Try changing the debugger to
Try changing the debugger to xDebug
OK, I found and configured
OK, I found and configured the php.ini file now so I can get further. But (there's always a 'but' right?) I get another error further along.
I have an object called mssql_database defined as:
class mssql_database extends dbconnection implements dbI get the following error:
mssql_database cannot implement DB - it is not an interface
even though db is defined as
interface db{
...
Any thoughts?
I would really like to get this working as I have a development team that would like to adopt Visual Studio as their development IDE for all their projects.
Thanks
Shane Miller
Additional information: The
Additional information:
The definition of the db interface and the mssql_database class are in seperate .php files. If placed in the same file then it appears to get past this issue. However, I really don't want to have to move all my interface code into the files that use them so a better solution would be great.
Thanks again.
Shane Miller