Re: strange error code

From: Date: Wed, 26 Jul 2000 20:49:30 +0000
Subject: Re: strange error code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8408@lists.php.net to get a copy of this message
I have seen this before. I think "paamayim nekudotayim" translates to double colon in english, from hebrew. The constant T_PAAMAYIM_NEKUDOTAIM represents the token "::" in the parser. The compiler is expecting a double colon operator on line 17 of your program. I would look at the global_fun(4); line. Right now you have global_fun set to be a pointer/reference to a instance of MyClass, but you are trying to call it as a function. This is probably where your problem is. Thanks. Peter > > Here is an amazing error 'code'! > ----- > Parse error: parse error, expecting T_PAAMAYIM_NEKUDOTAYIM' or > '('' in > /home/gearond/public_html/index.php on line 17 > ----- > with following phpinfo() output: > PHP Version 4.0.1pl2 > System Linux webdev 2.2.16 #97 Fri Jun 16 19:45:30 PDT 2000 i686 > unknown > Build Date Jul 19 2000 > Configure Command './configure' '--with-apache=../apache_1.3.12' > '--with-mysql=/mysql' '--prefix=/www' > Server API Apache > Virtual Directory Support disabled > Configuration File (php.ini) > Path /usr/local/lib > ZEND_DEBUG disabled > Thread Safety disabled > This program makes use of the Zend scripting language engine: > Zend Engine v1.0.1, Copyright (c) 1998-2000 Zend Technologies > ----- > for following file: > ----- > <?php > function val_checker($arg){ > echo("val_checker called <br>"); > if ($arg < 4) return 1; > else return 0; > } > class MyClass{ > var $local_datum; > var $function_holder; > function fun(){ > $this->local_datum=0; > } > } > $instance = new MyClass; > $instance->fun(); > printf("%d", val_checker($instance->local_datum)); > $global_fun=&val_checker; > $global_fun(4); > ?> > > ________________________________________________________________ > Dennis K. Gearon (Kegley) > Scientific Instrument Technician, School of EIT > Oregon Institute of Technology - One of USA's 100 Best College Buys > 3201 Campus Drive > Klamath Falls, OR 97601 > Voice 1-541-885-1563 > FAX 1-541-885-1689 > email gearond@oit.edu > ________________________________________________________________ > Happiness is when you want to go to your job in the morning and > when you want to go home in the evening. > ________________________________________________________________ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#8408) next »