Python background, and the 'format' function used to be so handy to me. I have this following toString in Python for the famous Fraction class:
def __str__(self):
"""
Return a user friendly form for the fraction.
:return: str
"""
return "{}/{}".format(self.numerator, self.denominator)
Java has a very similar one and I need something equivalent for the PHP, does it have a similar format function?