imagettftext( resource image, float size, float angle, int x, int y, int color, string fontfile, string text )
この ( int x ) に入れた値が文字の左端の基点になり、左揃えの文字になります。

これを画像に対して左右センターに入れたいのですが、 ( string text ) に対して文字の長さを取得するような事は可能でしょうか。
( string text ) の中身は半角英数の場合も、日本語の場合もあります。
アドバイスよろしくお願いします。