Food for thought -- $Sign is never initialized if $AString is equal to zero. This will cause a NOTICE level warning on PHP installations where error_reporting is set to report these warnings. (E_ALL, the default setting, would complain about this).
Suggested replacement: how about this?
$Sign = ($AString < 0)? -1 : 1;
Also, it's not really good programming style to have a function only operate on global variables. It totally limits the usefulness of the function because you can't just use it in another application. You should pass all the data to the function as parameters.
Finally, you create a variable, $A, to hold the result of your calculations, but all you do with $A is return it. It makes more sense to NOT create the variable and just return the result of the calculation directly. It's a little more streamlined, since you don't have to allocate memory for a variable that you're just going to free up anyway.
return $Sign * ($A1 + $A2/60 + $A3/3600);
Take care,
Nik
http://www.bigaction.org/