Re: [SMARTY-DEV] Trouble compiling tpl from resource plugin

From: Date: Tue, 16 Jul 2002 15:36:14 +0000
Subject: Re: [SMARTY-DEV] Trouble compiling tpl from resource plugin
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-190@lists.php.net to get a copy of this message
What about this ? if ($offset=strpos($string,':')) { $offset++; } $match = substr($string,$offset); >>>>>>>>>> Well we may have to use urlencode instead of trying to get the filename. preg_match and preg_split are get what we want but are much slower. repeated 100,000 times: urlencode(basename($string)); --> 2.920 secs preg_match('![^:|/\\\\$]!',$string,$match); --> 7.627 secs explode(':',basename($string)); --> 5.436 secs The second two get it right, but they take much longer. Unless there are any other ideas? Monte __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com

« previous php.smarty.dev (#190) next »