historical use of microtime() as a string

Discussion in 'PHP' started by winterheat, Oct 13, 2007.

  1. #1
    I wonder what's the historical use of microtime() returning a string?

    is the string actually useful at some point?

    i see code every where just get back the value and constructing it as a float. why not returning it as a float when microtime() was first written?
     
    winterheat, Oct 13, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    microtime() has always returned the same. Only the "get as float" option was added later, but it's optional if you set the first argument to "true".

    www.php.net/microtime
     
    nico_swd, Oct 13, 2007 IP