Implemented PHP casting