Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, Octavian Rasnita wrote: Hi, I also use Win 2k with PHP 5 in command line mode. This is the result I got when run from the command line: C:\Program Files\Apache Group\Apache2\htdocs\php> Content-type: text/html X-Powered-By: PHP/4.3.3 1,000,000,000,000 C:\Program Files\Apache Group\Apache2

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Oh thanks, I hope I will find a good combination that migh help me finally. Teddy - Original Message - From: "BAO RuiXian" <[EMAIL PROTECTED]> To: "M. Sokolewicz" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, November 28, 2004 2:23 A

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
quot;Octavian Rasnita" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, November 28, 2004 1:58 AM Subject: Re: [PHP] Re: Bad PHP error Hello, Octavian Rasnita wrote: >$var = 1; >//Here I have also tried inserting $var = (string) $var; >echo &quo

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, M. Sokolewicz wrote: you might want to try using number_format() to change the format back to "integer likeness" After I changed to echo number_format($var), I got 1,000,000,000,000:) Well, actually this is not my problem. I just tested this for fun. Best Bao Bao Ruixian wrote: Hello, Oc

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
you might want to try using number_format() to change the format back to "integer likeness" Bao Ruixian wrote: Hello, Octavian Rasnita wrote: This prints: 1E+012 and... not 1 as it should. I tried the above example, and I got what you want, i.e. 1. My environment is W

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread BAO RuiXian
Hello, Octavian Rasnita wrote: This prints: 1E+012 and... not 1 as it should. I tried the above example, and I got what you want, i.e. 1. My environment is Windows 2k, PHP 4.3.3 and Apache 2.0.47. Best Bao I have first tried just echo $var, but I thought that maybe if

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Marek Kilimajer
Octavian Rasnita wrote: Thank you. It seems that finally I will need to divide the numbers with 100, make the calculations that way, and specify that the numbers are in millions, because I can't find any solution with PHP. Yes, this is also a solution. bcmath functions are not good, because the

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
ovember 28, 2004 12:39 AM Subject: Re: [PHP] Re: Bad PHP error Octavian Rasnita wrote: > Well, that big number is not converted as a string and printed this way, or > I am missing something. > > Here is an example: > > $var = 1; > //Here I have also tried ins

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Marek Kilimajer
Octavian Rasnita wrote: Well, that big number is not converted as a string and printed this way, or I am missing something. Here is an example: This prints: 1E+012 and... not 1 as it should. I have first tried just echo $var, but I thought that maybe if I put it between quotes, it will

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
, but... Thank you. Teddy - Original Message - From: "M. Sokolewicz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Octavian Rasnita" <[EMAIL PROTECTED]> Sent: Saturday, November 27, 2004 11:08 PM Subject: Re: [PHP] Re: Bad PHP error Marek Kilimajer

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
Marek Kilimajer wrote: > This would be for unsigned integers. PHP knows only signed integers, > however. So the limit is 2147483648 Good point :) When you're outputting it, PHP will convert it back to a string, using the normal integer representation (which is stored aswell). So that should be fi

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Octavian Rasnita
Ok, I understand. But what can I do if I want to print big numbers like 123 billion? (but real numbers, not those written with the "E" letter in them? Is this possible with PHP or I need to do it with another language? Thank you. Teddy From: "M. Sokolewicz" <[EMAIL PROTECTED]> Octavian Rasni

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread Marek Kilimajer
M. Sokolewicz wrote: Octavian Rasnita wrote: Hi all, I have tried the following script: $val = 100; if (is_int($val)) { echo $val; } else { echo "$val is not an integer\n"; } The answer is: 100 is not an integer. Why does this happen? I use PHP 5. Isn't PHP able to work with values