Re: PHP session variables

From: Date: Wed, 15 Aug 2012 19:19:04 +0000
Subject: Re: PHP session variables
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-318712@lists.php.net to get a copy of this message
On Aug 14, 2012, at 11:01 AM, Robert Cummings <robert@interjinn.com> wrote: > > 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. Rob: Again thanks. Sorry, I totally missed your point. In my "defense" I commonly use the value returned from microtime() as a string and not as a float. The code that followed my "microtime( false );" demo broke the string and recombined it into a float. So, when you said: Please see the current signature for microtime(): mixed microtime ([ bool $get_as_float = false ] ) I looked at that and said to myself, "Oh, I need to define it as 'false' " because I was using it as a sting. I completely overlooked your point that microtime() could return a float and thus no need to work with it as a string -- duh! The demo is fixed (I think): http://www.webbytedd.com/b/timed1/ Thanks, tedd _____________________ tedd@sperling.com http://sperling.com

« previous php.general (#318712) next »