Stack Traces in php

Is there anyway to print stack traces in php equivalent to Java’s .printStackTrace() method for exceptions?