PDA

View Full Version : eregi and preg_match


miz
02-07-2005, 03:39 PM
Page generated in 3.73249292374 seconds

if i uses some functions to get vars from text
with ereg/i or preg_match

Page generated in 22.3667008877 seconds

any ideas ? what might be the problem ?

Dean C
02-07-2005, 03:48 PM
Something else is happening in your script. Either that or you have a MAJOR MAJOR loop of 100+ records going on :)

miz
02-07-2005, 03:49 PM
my script dosent use any db tables

also not a while loop.... not a single 1

with out the eregi/preg its counts 2 secs.

Dean C
02-07-2005, 04:08 PM
2 seconds for script execution is pretty steep... What exactly does the script do?

miz
02-07-2005, 04:15 PM
well something like that

$var = "long long long long info here with <B> and <br> and ++++ like that";

// strip title from var
if (!$title And ereg(bla bla bla))
{
$title = "Unknowen";
}
else
{
$title = $title[1];
}

thats all