ugh. I&#39;m an iddiot. Reading top down or something.<br><br><div><span class="gmail_quote">On 2/5/07, <b class="gmail_sendername">Matt Wood</b> &lt;<a href="mailto:matt@woodzy.com">matt@woodzy.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
preg_replace take significantly more time (and memory) to execute than str_replace... just wondering what your rationale for this was...<br><br>From PHP Website:<br>mixed <b>str_replace</b> ( mixed search, mixed replace, mixed subject [, int &amp;count] )
<br>
     This function returns a string or an array with all occurrences of
     <i><tt>search</tt></i> in <i><tt>subject</tt></i>
     replaced with the given <i><tt>replace</tt></i> value.  If you
     don&#39;t need fancy replacing rules (like regular expressions), you should
     always use this function instead of <a href="http://hu.php.net/manual/en/function.ereg-replace.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ereg_replace()</a> or
     <a href="http://hu.php.net/manual/en/function.preg-replace.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">preg_replace()</a>.<div><span class="e" id="q_11094238d1a687c5_1"><br><br><div><span class="gmail_quote">
On 2/5/07, <b class="gmail_sendername"><a href="mailto:oscar@devel.lifetype.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">oscar@devel.lifetype.net
</a></b> &lt;<a href="mailto:oscar@devel.lifetype.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">oscar@devel.lifetype.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Author: oscar<br>Date: 2007-02-05 17:15:16 -0500 (Mon, 05 Feb 2007)<br>New Revision: 4693<br><br>Modified:<br>&nbsp;&nbsp; plog/branches/lifetype-1.2/class/net/http/session/sessionmanager.class.php<br>Log:<br>Added Jon&#39;s fix<br>

<br><br>Modified: plog/branches/lifetype-1.2/class/net/http/session/sessionmanager.class.php<br>===================================================================<br>--- plog/branches/lifetype-1.2/class/net/http/session/sessionmanager.class.php&nbsp;&nbsp;2007-02-05 21:49:03 UTC (rev 4692)
<br>+++ plog/branches/lifetype-1.2/class/net/http/session/sessionmanager.class.php&nbsp;&nbsp;2007-02-05 22:15:16 UTC (rev 4693)<br>@@ -104,7 +104,7 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$scriptUrl = HttpVars::getBaseUrl();<br><br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$url = new Url( $scriptUrl );<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $domain = str_replace( &quot;www.&quot;, &quot;.&quot;, $url-&gt;getHost());<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $domain = preg_replace(&quot;/^www\./&quot;, &quot;.&quot;, $url-&gt;getHost());
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// this won&#39;t work for top level domains and domains such as<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// &#39;localhost&#39; or internal domains for obvious security reasons...<br><br>_______________________________________________
<br>pLog-svn mailing list<br><a href="mailto:pLog-svn@devel.lifetype.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pLog-svn@devel.lifetype.net</a><br><a href="http://limedaley.com/mailman/listinfo/plog-svn" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://limedaley.com/mailman/listinfo/plog-svn</a><br></blockquote>
</div><br>
</span></div></blockquote></div><br>