PHP Classes

Parse error

Recommend this page to a friend!

      Number to word  >  All threads  >  Parse error  >  (Un) Subscribe thread alerts  
Subject:Parse error
Summary:Problem using the package Number to word
Messages:3
Author:arnaud beziat
Date:2006-09-08 18:09:39
Update:2006-09-11 08:31:27
 

  1. Parse error   Reply   Report abuse  
Picture of arnaud beziat arnaud beziat - 2006-09-08 18:09:39
Hi,

I'm really interested in using this class, because I need to write on the fly a number in words on a contract.

I encounter a Parse error:

syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in ... on line 15 which is :

11 <?
12
13 class CLASS_Numbertoword {
14
15 const bAppendS = true; //Use this when the unit takes a "s" when multiplied

  2. Re: Parse error   Reply   Report abuse  
Picture of Ian Lord Ian Lord - 2006-09-08 20:36:17 - In reply to message 1 from arnaud beziat
I guess, without a research

That you have not php5 installed but perhaps php 4.x.

Am I right ? If so, It's because class definitions have changed a lot in php5 so unless you rewrite a couple of things which should be very easy to do, you would need to upgrade to php5.

Other then that, if it's not a php4 problem, could you send your phpinfo () output, it might reveal the problem

Thanks

  3. Re: Parse error   Reply   Report abuse  
Picture of arnaud beziat arnaud beziat - 2006-09-11 08:31:27 - In reply to message 2 from Ian Lord
Hi Ian Lord,

You're right, I only have Php 4 enabled on my server... I'll figure out if I can upgrade it easily.
Thanks a lot for your help