Re: [PHP] speet testing (was URL parsing)

2002-12-19 Thread Sean Burlington
1LT John W. Holmes wrote: I wonder if you could pass on some pointers for speed testing. thanks Nothing fancy. Just using the getmicrotime() function defined on the microtime() manual page to get the time before the bit I'm testing and after and subtract to get the difference. www.php.net/mi

Re: [PHP] speet testing (was URL parsing)

2002-12-19 Thread 1LT John W. Holmes
> > Assuming $url is what you have above: > > > > $tilde = strpos($url,"~"); > > $slash = strpos($url,"/",$tilde); > > $length = $slash - $tilde; > > > > $username = substr($url,$tilde,$length); > > > > Or you can use a regular expression, but the above is probably faster. > > > > preg_match("!(~[^