What does [if test "/usr/local/bin/php" = '@'php_bin'@'; then] test for
Hi folks
I'm waiding through some php stuff and came upon the pear script. Within I found the mysteries line Code:
if test "/usr/local/bin/php" = '@'php_bin'@'; then For completion heres the complete pear script Code:
#!/bin/sh |
Probably a substitution, although I don't use PHP or pear. What happens if you remove @? What happens if you echo '@'php_bin'@'?
Kevin Barry |
This isn't exactly a pear script; it's a shell script pear uses to get data about how you have PHP set up on your system.
The @ symbol has no relevance to PHP in this context (in a PHP script, the @ symbol suppresses errors, but this isn't a PHP script). I don't use pear, but, based on what the rest of the script does, it looks like php_bin and php_dir _might_ be either commandline utilities or some kind of environmental variable installed with pear. If pear is set up on your system then php_bin would probably point to your system's PHP installation. ------ update ------ I just stopped by the #pear channel and they called them 'replacements' and told me to type: pear config-show which gives a listing of pear's configuration variables. |
I was a bit in a hurry writing this thread. So I just wrote pear script. What I meant was the pear bash script. ( Doesn't sound good either ;))
If I just echo '@'php_bin'@' before the if block it just prints Code:
@php_bin@ Code:
PHP CLI/CGI binary php_bin /usr/bin/php Thanks to the both of you I'm all set and my nosiness is satisfied :D Cheers Zhjim |
All times are GMT -5. The time now is 05:35 PM. |