Re: [PHP] strange reference behavior

2007-09-01 Thread Robert Enyedi
Thanks for the clarifications. Regards, Robert Robert Cummings wrote: On Sat, 2007-09-01 at 11:39 +0100, Martin Ellingham wrote: Robert Enyedi wrote: Hi, I've been studying the PHP reference mechanism (with PHP 5.2.1) and I'm unsure if the following behavior is normal. This cod

[PHP] strange reference behavior

2007-09-01 Thread Robert Enyedi
Hi, I've been studying the PHP reference mechanism (with PHP 5.2.1) and I'm unsure if the following behavior is normal. This code works as expected: $a = 2; $b = &$a; //$c = &$a; $c = $b; $a = 1; echo $c."\n"; // Prints "2" as expected but thi

Re: [PHP] unset() side effects in functions

2007-04-23 Thread Robert Enyedi
Rob, Thanks for the detailed explanation about the reference assignments that are happening in the background. Now things start to make sense :-) Regards, Robert Robert Cummings wrote: On Mon, 2007-04-23 at 14:04 +0300, Robert Enyedi wrote: I'm doing some experimenting with the

[PHP] unset() side effects in functions

2007-04-23 Thread Robert Enyedi
I'm doing some experimenting with the unset() (http://php.net/unset) language construct in a PHP 5.2.1 installation. I did not find any documentation on what happens to an identically named local variable's value after an unset is performed. Let me start with this example: in function (init):

Re: [PHP] Reuse PHP functions in a third-party application

2007-03-21 Thread Robert Enyedi
running inside the running PHP server. Regards, Robert Richard Lynch wrote: On Tue, March 20, 2007 5:27 am, Robert Enyedi wrote: I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in

[PHP] Reuse PHP functions in a third-party application

2007-03-20 Thread Robert Enyedi
I'm not very familiar with the internal architecture of the Zend PHP engine nor with the PHP module mechanism, but can you reuse compiled PHP modules in other applications? Is there a way of calling the functions of a compiled module from a third party C application? Thanks, Robert -- PHP G

[PHP] Cast to unset

2007-02-27 Thread Robert Enyedi
In the PHP grammar I encountered the feature of casting to unset, e.g. (unset)$a. I did not manage to find any specific documentation on this, only people wandering what it might do (http://blog.thinkphp.de/archives/33-Casted-fun..html). So what exactly does cast to unset do? Thanks, Robert