--TEST-- GH-16188 (Assertion failure in Zend/zend_exceptions.c) --FILE-- getTraceAsString()); printf("getPrevious:\n%s\n\n", get_class($re->getPrevious())); printf("__toString:\n%s\n\n", $re); ?> ==DONE== --EXPECTF-- getTraceAsString: #0 {main} getPrevious: Exception __toString: Exception in %s:%d Stack trace:%A #%d {main} Next TypeError in %s:%d Stack trace:%A #%d {main} ==DONE==