Added max and min functions

Evaluation conforms to PHP's object comparison procedures.