continuing conversion from Hack to PHP