quella function mi dà:

Parse error: syntax error, unexpected T_VAR

si...comunque anche io preferisco usare funzioni in php mi è piu simpatico