i played some more with this:
set_time_limit(1);
while(1) {
}
//exits after 1 sec
while(1) {
print time()."\n";
}
//exits after 1 min 15 secs
while(1) {
$a=count("heh");
print "$a";
}
//exits after 1 min 45 sec
// warning says that 1 second limit is reached !!
so, is there any other solution to really limit time for script?