Convert text to image in php

Some of the cases we need to create an image dynamically when the web page is loading, Then a question raised in the mind - Can I convert text to image in PHP? the answer is Yes! why not.