Re: [PHP] Variable functions within an object

2004-07-30 Thread Julio Sergio Santana
Curt Zirzow wrote: or for the oneline purists :) ${ ${$this->fname} = $this->fname }(); wow.. ${} is more powerful than i had originally though. Thank you Curt, With your suggestion, I finally re-wrote the example, and here it is: function foo() { echo "In foo()\n"; } class a { var $fname;

Re: [PHP] Variable functions within an object

2004-07-30 Thread Julio Sergio Santana
Curt Zirzow wrote: $this->{$this->fname}(); or (what it actually is doing.. ) $func = $this->fname; $this->$func(); Curt The point here is that the named function is outside the object. That is, $this->foo() doesn't exist, so $this->{$this->fname}(), does not work either. But if you look

[PHP] Variable functions within an object

2004-07-29 Thread Julio Sergio Santana
I need to record the names of functions, and then use them later. Recently I found the following example within the on-line documentation: \n"; } $func = 'foo'; $func();// This calls foo() ?> then I supposed that it was easy to extend this concept to objects and wrote the following case:

Re: [PHP] How can I write/read encoded numbers into/from a file?

2004-07-08 Thread Julio Sergio Santana
Buff{0}) | ord($sBuff{1}) << 8 | ord($sBuff{2}) << 16 | ord($sBuff{3}) << 24; // Get the numerical value of each byte, then shift the bytes to get the 4 byte number. (Little Endian) Chris Julio Sergio Santana wrote: I'm just starting with PHP, and I've been browsing the wh

Re: [PHP] How can I write/read encoded numbers into/from a file?

2004-07-08 Thread Julio Sergio Santana
I tried the following and it didn't work: X-Powered-By: PHP/4.1.2 Content-type: text/html ** It was supposed to output: ***65*** [EMAIL PROTECTED] wrote: http://us4.php.net/manual/en/function.base64-decode.php -Original Message- From: Julio Sergio Santana <[EMAIL PROTECTED]>

[PHP] How can I write/read encoded numbers into/from a file?

2004-07-08 Thread Julio Sergio Santana
I'm just starting with PHP, and I've been browsing the whole manual to find how to solve the following problem: 1. An integer number is internally represented in 4 bytes. Say, for instance, number 65 is represented by 0x0041, that is the string "\0\0\0\0x41", and not the string "65". 2. How