PHP: TrueType bounding box with GD

Just a snippet to print out the values in a bounding box. print_r’s simple outline format just makes it easier to visualize.

<?php
$im = imagecreatetruecolor(800,600);
$arr = imagettfbbox(30,0,'fonts/arial.ttf','this is a long string of text!');
print_r($arr);
?>