Therefore, you do not. Using foreach doesn't work.
If you need a list of available methods on the object, then, suddenly... the first link from https://www.google.ru/search?q=php+object+methods
If you need a complete list of methods of an object, use reflection. I am sure that the keywords php object method reflection will help in the search.
Try first to look for information yourself, and then ask questions.