phpワンライナー

-rオプションを付ける。perlは-e。

php -r 'echo "hello";' // セミコロンが必要。phpによるのかな。

ちなみにphpinfoはブラウザ越しじゃなくてシェルで確認できる。

php -r 'phpinfo();' | less