PHP can output any kind of data you want, it is not limited to outputting HTML.
TML (assuming you are talking about this TML) is a language for embedding various programming languages in a template.
So you could write PHP that would output Perl embedded in TML which would output HTML. (I've worked on systems that used Perl Mason to generate PHP to generate JavaScript to generate HTML … which were horrible).
The challenge would be (assuming you wanted that) to get the webserver to push the output of the PHP program through the TML engine.
The problem would be that this is wildly inefficient as you are adding two different layers of Template + Server Side Programming instead of just using one.
If you're going to work on a system written using TML, then you should continue to use TML. PHP won't give you any capabilities that TML doesn't already offer you. The only advantage is that (presumably) you already know how to write PHP … but that won't help you much when you need to understand existing TML code.