added mocking functions in php