I have been using php for shell script for some years now, as it gives the advantage that I don't have 2 re-write my class and function libraries for the backend side of apps I have written...
In the old days, I used to just compile mod_php and then also the cgi to get the php stand alone binary (moving out of the cgi-bin). It now looks like PHP is trying to encourage this by shipping the standalone binary.
My gripe with this is, that you would have thought they would implemented a switch that means u can stop using the php tags, or make em optional though shell scripts.
PHP shell script rant
Moderator: General Moderators
in some way they didbut in script files you can leave php-blocks to passthru output. That wasn't changed so you need the tags.
Code: Select all
php -r "print_r($GLOBALS);"