[PHP-DEV] Behaviour of preg_replace with /e

2004-08-05 Thread Peter Brodersen
Hi, I have read PHP bug #15050 and PHP bug #10666. Example at bottom of this mail. Andrei states in bug #10666: "The fact that it backslash-escapes single and double quotes in matches before substituting $1 is a feature, not a bug, otherwise you'd have a really hard time figuring out which quotes

[PHP-DEV] Re: [PHP-CVS] cvs: php-src / README.CVS-RULES

2004-08-05 Thread Antony Dovgal
On Thu, 5 Aug 2004 09:38:55 -0700 Andrei Zmievski <[EMAIL PROTECTED]> wrote: > Why is it not recommended anymore?? It was approved by Derick, that @ screws up things, so it's not recommended ATM. --- WBR, Antony Dovgal aka tony2001 [EMAIL PROTECTED] || [EMAIL PROTECTED] -- PHP Internals - PHP

Re: [PHP-DEV] lxr pecl (was lxr.php.net needs new picture)

2004-08-05 Thread Andrei Zmievski
On Fri, 06 Aug 2004, Alan Knowles wrote: > As a sidenote to that, Is it possible to get pecl indexed on lxr - it > would make finding examples of Zend API usage alot easier. Done. -Andrei * The best source is the source code. * -- PHP Internals - PHP Runtime Development Mailing List To unsubsc

Re: [PHP-DEV] lxr pecl (was lxr.php.net needs new picture)

2004-08-05 Thread Alan Knowles
As a sidenote to that, Is it possible to get pecl indexed on lxr - it would make finding examples of Zend API usage alot easier. Regards Alan Sean Coates wrote: FWIW: http://sean.caedmon.net/images/lxr-php-banner.gif Anyone with the appropriate karma, feel free. S Andrey Hristov wrote: Currently

Re: [PHP-DEV] lxr.php.net needs new picture

2004-08-05 Thread Sean Coates
FWIW: http://sean.caedmon.net/images/lxr-php-banner.gif Anyone with the appropriate karma, feel free. S Andrey Hristov wrote: Currently on lxr.php.net there is at the top of every page an image stating "PHP4 Cross reference" thanks, andrey -- PHP Internals - PHP Runtime Development Mailing List

[PHP-DEV] Re: [PHP-CVS] cvs: php-src(PHP_5_0) / README.CVS-RULES

2004-08-05 Thread Andrei Zmievski
Hello, Who made this decision?? On Thu, 05 Aug 2004, Antony Dovgal wrote: > tony2001 Thu Aug 5 10:19:59 2004 EDT > > Modified files: (Branch: PHP_5_0) > /php-src README.CVS-RULES > Log: > MFH: remove all references to @ thing, as it's not recommended > >

Re: [PHP-DEV] Variable Variables and Superglobals

2004-08-05 Thread Sara Golemon
> function foo($arg){ > $lvar="_ENV"; > > echo $_ENV["OS"]; // --> Windows NT > echo ${$arg}["OS"]; // --> *nothing* > echo ${$lvar}["OS"]; // --> *nothing* > var_dump( $$arg ); // --> NULL > var_dump( $$lvar); // --> NULL > } > // END ///

Re: [PHP-DEV] Variable Variables and Superglobals

2004-08-05 Thread Curt Zirzow
* Thus wrote A.Rico: >What the PHP documentation says about variable variables and > superglobals is that you can't use them as a "pointer": > >/*Warning*/ > >/ Please note that variable variables cannot be used with PHP's >Superglobal arrays > >

Re: [PHP-DEV] Modulo Function returns incorrect results

2004-08-05 Thread Jason Garber
Hello Matthew, 3/4 = (0*4)+3 --> 3%4 = 3 9/4 = (2*4)+1 --> 9%4 = 1 20/10 = (2*10)+0 --> 20%10 = 0 4 goes into 3 a total of ZERO times with a remainder of 3. 10 goes into 20 a total of TWO times with a remainder of 0. Take a look at a standard (integer) long division p

Re: [PHP-DEV] Modulo Function returns incorrect results

2004-08-05 Thread Thomas Goyne
On Thu, 05 Aug 2004 20:02:04 -0500, Matthew Boehm <[EMAIL PROTECTED]> wrote: Returns 11. What is going on? Was my C.S. Professor wrong in telling us that the % function returns the left side of the decimal in a division? I suggest you demand a refund for all courses you paid for with that pr

Re: [PHP-DEV] Modulo Function returns incorrect results

2004-08-05 Thread George Schlossnagle
Hi. I think you don't understand what modulo does. The examples you give all suggest you think it is simply integer divide. a % b returns the remainder when the integer a is divided by the integer b. All your 'examples' illustrate correct behavior of the modulo operator. George On Aug 5,

[PHP-DEV] Modulo Function returns incorrect results

2004-08-05 Thread Matthew Boehm
Found some weird behavior in the built in mod function (%): $a = 4; $b = 3; print ( $a % $b ); (returns 1 as it should) Now swap $a and $b: $a = 3; $b = 4; print ( $a % $b ); This returns 3. 3?! 3/4 is 0.75. Shouldn't this return 0? Try this one: $a = 20; $b = 10; print ( $a

[PHP-DEV] CVS Account Request: peterhuewe

2004-08-05 Thread Peter Hüwe
I want to contribute to the documentation of php. i.e. by translating docs. In the first place I want to translate the pear.php.net docs, as there is hardly a german version of it. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Marcus Boerger
Hello Ferdinand, Thursday, August 5, 2004, 8:07:05 PM, you wrote: > On 5 Aug 2004 at 13:59, George Schlossnagle wrote: >> > Can abstract methods be protected? >> >> No. > Why not? Look at my singleton example... Even your protected __construct can be overwritten and made public again. So yo

Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Ferdinand Beyer
On 5 Aug 2004 at 13:59, George Schlossnagle wrote: > > Can abstract methods be protected? > > No. Why not? Look at my singleton example... -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread George Schlossnagle
On Aug 5, 2004, at 1:51 PM, Jason Garber wrote: Hello Marcus, Can abstract methods be protected? No. George -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Jason Garber
Hello Marcus, Can abstract methods be protected? -- Best regards, Jasonmailto:[EMAIL PROTECTED] Thursday, August 5, 2004, 1:32:05 PM, you wrote: MB> Hello Ferdinand, MB> Thursday, August 5, 2004, 5:01:42 PM, you wrote: >> Trying to write a singleton interface:

Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Marcus Boerger
Hello Ferdinand, Thursday, August 5, 2004, 5:01:42 PM, you wrote: > Trying to write a singleton interface: > interface Singleton { > // Disallow public construction > protected function __construct(); > public static function getInstance(); > } > I got an error saying I was not all

[PHP-DEV] Re: [PHP-CVS] cvs: php-src / README.CVS-RULES

2004-08-05 Thread Andrei Zmievski
Why is it not recommended anymore?? On Thu, 05 Aug 2004, Antony Dovgal wrote: > tony2001 Thu Aug 5 10:15:37 2004 EDT > > Modified files: > /php-src README.CVS-RULES > Log: > remove all references to @ thing, as it's not recommended. > always add it to NEW

[PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Ferdinand Beyer
Trying to write a singleton interface: interface Singleton { // Disallow public construction protected function __construct(); public static function getInstance(); } I got an error saying I was not allowed to declare the constructor protected - I should either use public or omit it

[PHP-DEV] emalloc and friends

2004-08-05 Thread Derick Rethans
Hei, I've been debugging some memory related problems lately and had the need to disable the emalloc and friend stuff so that valgrind gave meaningful errors. The attached patch adds some replacement defines to the zend_alloc.h stuff and is attached. (You can swap between the two ways by changing

Re: [PHP-DEV] Re: emalloc and friends

2004-08-05 Thread Scott MacVicar
Hi, That previous bt was incorrect it was a pcre bug I was looking at. I applied both patches you attached to your initial message. I used php -r 'phpinfo();' to get the following bt #0 0x420738f3 in free () from /lib/tls/libc.so.6 (gdb) bt #0 0x420738f3 in free () from /lib/tls/libc.so.6 #1 0x0

[PHP-DEV] [PATCH for ZE] is_callable() doesn't differentiate private/protected methods from public ones

2004-08-05 Thread Antony Dovgal
Hi all. The patch fixes bug #29210 perfectly, but I'm not sure if the implementation is the best. The appropriate test is attached too. Any comments are welcome. --- WBR, Antony Dovgal aka tony2001 [EMAIL PROTECTED] || [EMAIL PROTECTED] Index: zend_API.c

Re: [PHP-DEV] Document call_time_pass_reference

2004-08-05 Thread Jakub Vrana
l0t3k wrote: > in other (compiled) programming languages, a function prototype specifies > the "contract" between the function and its callers, and > makes explicit the programmer's intentions as to how the function is to be > called. Usually expected parameter types and passing methods specified b