Tor client creates a local socks proxy server at 127.0.0.1:9050
Therefore you should start PhantomJS pointing it to that proxy:
phantomjs --proxy-type=socks5 --proxy=127.0.0.1:9050 script.js