Re: PHP session variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12-08-14 10:41 AM, Tedd Sperling wrote:
On Aug 13, 2012, at 10:59 AM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:

On 12-08-10 04:42 PM, Tedd Sperling wrote:
On Aug 10, 2012, at 1:21 PM, Ege Sertçetin <sertcetin@xxxxxxxxxx> wrote:

Hi. My question will maybe out of topic, I'm sorry.
How can you know that one way will be much slower than other one? I mean, how can I learn which function is faster before I test it?

Ege:

No your question is on topic.

This question should be asked on the list, so I'll present Q:A instead of answering privately

http://www.webbytedd.com/b/timed1/

The code is there -- if you have questions, please post them to the list.

Ted,

Please see the current signature for microtime():

    mixed microtime ([ bool $get_as_float = false ] )

The optional paramter was added in PHP 5.0.0. I think it's safe to update your habits :)

Cheers,
Rob.

Rob:

Fixed.

Thanks -- my habits are always in a state of being updated -- just ask my wife.

I'm not sure if you're making a joke, but your changes have no effect. You've merely explicitly stated the optional parameter's default value. What I had meant was to change the following:

<?php

$starttime = microtime();
$startarray = explode(" ", $starttime);
$starttime = $startarray[1] + $startarray[0];

?>

To the following :)

<?php

$starttime = microtime( true );

?>

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux