Re: PHP,pointers and C
| From: | (Richard Lynch) | Date: | Mon, 03 Jul 2000 23:17:38 +0000 |
| Subject: | Re: PHP,pointers and C | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4599@lists.php.net to get a copy of this message | ||
In article <3959B21A.BA5E9F76@mahindrabt.com>, gautamw@mahindrabt.com
(gautam) wrote:
> 1.Can pointers be used within PHP?Passing by reference works but has
> anyone tried out using pointers(if at all they can be used).
In PHP4 *only*:
$foo = 5;
$bar = &$foo;
$bar is now an "alias" of $foo.
PHP3 has pass by referency only -- no true references.
> 2.Can anyone give an example of C functions called from within PHP
> code?
For command-line C programs, use exec().
For functions compiled into PHP and callable by your PHP scripts, read
apidoc.txt in the tarball.
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)