php-windows Digest 10 Feb 2008 03:56:15 -0000 Issue 3421
Topics (messages 28776 through 28778):
Re: string function
28776 by: trystano.aol.com
28777 by: Niel Archer
Float value Division gives irrational results php 5.2.5
28778 by: INDIANNIC-HOSTING
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Can I just ask what the difference is between ereg and preg_replace? Thanks.
Tryst
-----Original Message-----
From: Elizabeth M Smith <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Fri, 8 Feb 2008 14:26
Subject: Re: [PHP-WIN] string function
Viola Holownia wrote:
> hi
>
> Have you tried ereg_replace() ?
> http://www.php.net/manual/en/function.ereg-replace.php
>
>
> cheers
> viola
>
I would NOT suggest ereg_replace, especially on windows - if you need to
do advanced replacement and str_replace doesn't work, try preg_replace -
http://php.net/preg_replace
Regular expressions are your friend.
Thanks,
Elizabeth
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
________________________________________________________________________
AOL's new homepage has launched. Take a tour at http://info.aol.co.uk/homepage/
now.
--- End Message ---
--- Begin Message ---
Hi
> Can I just ask what the difference is between ereg and preg_replace? Thanks.
preg* are PCRE compatible functions. ereg*are POSIX Extended.
AFAIR, the PCRE ones support several additional features and are binary
safe, while the POSIX ones are not.
--
Niel Archer
--- End Message ---
--- Begin Message ---
hi
can somebody help me on this please.
Description:
------------
Basic division of one float value by another gives irrational results in php
5.2.5
os : windows 2000, iis 5 upto date with will microsoft patches
we have two independent websites each using two versions of php on the
same server
same sample php code (as given below) placed on each website
http://maptelltrack.com/divide.php (php 4.3.10 gives wrong results)
http://maptell.com/divide.php (php 5.2.6 gives correct results)
php 4.3.10 gives correct results and php5.2.5 gives Wrong results for
the same php code on the web server
php info file for each website
http://maptelltrack.com/info.php (php 5.2.5) using php-cgi.exe
(we have tried all versions upto php5.2-win32-latest)
http://maptell.com/info.php (php 4.3.10) using php.exe
Please do not try the same with command line since the results are
different.
Sample code:
---------------
<?php
$test = var_dump (46985.532 / 3600) ;
echo($test);
?>
Expected result:
----------------
float(13.0515366667)
Actual result:
--------------
float(10)
thanks
rajesh
--- End Message ---