I have the following php code:
function mapWordsToOriginal()
{
try
{
$d = array();
function map_FilteredWithOriginal($n, $m)
{
return(array(($n + 1) => ($m + 1)));
}
foreach ($this->wordsArray as $word)
{
array_push($d, array_map(
"map_FilteredWithOriginal",
array_keys(
$this->wordsArray, $word),
array_keys($this->originalText, $word)));
}
for ($i = 0; $i < count($d); $i++)
{
for ($j = 0; $j < count($d[$i]); $j++)
{
$this->mapFilteredWithOriginal +=$d[$i][$j];
}
}
if ($this->debug)
{
print_r($this->mapFilteredWithOriginal);
}
}
catch (Exception $e)
{
echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
i use this function couple of times (depends on how long is the text), however when I get to this code inside for the second time:
function map_FilteredWithOriginal($n, $m)
{
return(array(($n + 1) => ($m + 1)));
}
the script just stops.
I dont know why and no exception is being catched....