Is it possible to say to a script to search for an interpreter not in an absolute location, but in his path?
For example, writing #!/usr/bin/php
will fail if the user has php installed somewhere else.
Just writing #!php
does not automatically work, of course, and I couldn't find anything about it, they just all treat this method as if it was "the way"® to do it.
So, is there a standard simple syntax to say "search for it anywhere in your path"?
Try:
#!/usr/bin/env php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With