How to be safe when PHP6 is released and ereg regex is turned into an extension instead of core
<p>For those of you who don't know what's gonna happen in PHP6, here's a nice short read: <a href="http://jero.net/articles/php6" rel="nofollow">http://jero.net/articles/php6</a></p>

<p>Now, if you have functions that depend on ereg and you don't have control over the php.ini file on the server that's hosting your scripts, how do you deal with that?</p>

<p>For instance, this function here:</p>

<pre><code>function currentDateTime() {
  list($micro, $Unixtime) = explode(" ",microtime());
  $sec= $micro + date("s", $Unixtime);
  $sec = mb_ereg_replace(sprintf('%d', $sec), "", ($micro + date("s", $Unixtime)));
  return date("Y-m-d H:i:s", $Unixtime).$sec;
}
</code></pre>

<p>It seems to be dependant on ereg, so how do I replace this?</p>
