implementing type hinting in php