[PHP-DEV] Re: [Zend Engine 2] RFC: Conversion patch

2002-11-27 Thread Derick Rethans
On Wed, 27 Nov 2002, Andi Gutmans wrote: At 04:41 PM 11/26/2002 -0500, Daniel Cowgill wrote: So why do the conversion in arithmetic? This seems bizarrely inconsistent to me: ? print (int) 0xA + 0; // prints 0 print (int) (0xA + 0); // prints 10 ? I think it's reasonable to expect

[PHP-DEV] Re: [Zend Engine 2] RFC: Conversion patch

2002-11-27 Thread Zeev Suraski
At 07:27 27/11/2002, Andi Gutmans wrote: At 04:41 PM 11/26/2002 -0500, Daniel Cowgill wrote: So why do the conversion in arithmetic? This seems bizarrely inconsistent to me: ? print (int) 0xA + 0; // prints 0 print (int) (0xA + 0); // prints 10 ? I think it's reasonable to expect those

RE: [PHP-DEV] Error Codes, Langs, etc

2002-11-27 Thread Zeev Suraski
At 02:27 27/11/2002, Stig S. Bakken wrote: Let's try being realistic, and focus on the quick wins first, such as good error codes. Go Stig. Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Concrete suggestion re: i18n messages

2002-11-27 Thread Steph
nope, it needs to be ini_set() -able if we're doing this at all .. either that or we keep English as the hard-coded default and trust that production server admins will see the wisdom of that. I don't get why we can't use an error code and spawn an i8n-friendly docref through it? - Original

[PHP-DEV] Weird PHP Problem

2002-11-27 Thread Becky Gruebmeyer
Ok...Using newest version of PHP on an NT IIS machine with a SQL 2000 database. Here is the issue: I have a nvarchar field with a size of 4000. I submit a text string from a form to this field. It will display on submit using echo nl2br($variable) and it will display fine. When I look in the

[PHP-DEV] PHP 5 - when?

2002-11-27 Thread Piotr Sobolewski
Hi, First of all - I hope I post to the right group. I could not find any righter group for my question Can somebody tell me when the version 5 of PHP will be released? Can I find such plans at some website? Like: We plan to release version 4.3 in march, and then the version 5 about may ? I ask

Re: [PHP-DEV] PHP 5 - when?

2002-11-27 Thread Wez Furlong
Hi Piotr, The short answer is that it will be ready when it is ready :) We don't have a definite time frame for PHP 5 (we are not 100% sure what features it will contain), and probably won't have a definite time frame until we begin the release cycle (typically a month or more before we release

Re: [PHP-DEV] Weird PHP Problem

2002-11-27 Thread Adam Voigt
Yep, NVARCHAR's get pissy at large sizes (in my experience anyway) when PHP is interacting with them, (or any of the N variables for that matter) change it to a TEXT and see what happens. On Wed, 2002-11-27 at 06:20, Becky Gruebmeyer wrote: Ok...Using newest version of PHP on an NT IIS machine

[PHP-DEV] call_stack

2002-11-27 Thread Miham KEREKES
Hi! I'm new to this list, I want to know if there is any function which could return the actual call stack, or is it planned to be added? It could be very useful (for example in my case, now :-). If it's already implemented, i'm sorry, i could not be able to find it in the doc.. In this case

Re: [PHP-DEV] call_stack

2002-11-27 Thread Derick Rethans
On Wed, 27 Nov 2002, Miham KEREKES wrote: Hi! I'm new to this list, I want to know if there is any function which could return the actual call stack, or is it planned to be added? It could be very useful (for example in my case, now :-). debug_backtrace() will be available in PHP 4.3.0 and

Re: [PHP-DEV] call_stack

2002-11-27 Thread Phil Dier
On Wed, 27 Nov 2002 15:41:25 +0100 (CET) Derick Rethans [EMAIL PROTECTED] wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: Hi! I'm new to this list, I want to know if there is any function which could return the actual call stack, or is it planned to be added? It could be very

Re: [PHP-DEV] call_stack

2002-11-27 Thread George Schlossnagle
debug_backtrace was backported into ze1. 4.3 will sstill use ze1. George Phil Dier wrote: On Wed, 27 Nov 2002 15:41:25 +0100 (CET) Derick Rethans [EMAIL PROTECTED] wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: Hi! I'm new to this list, I want to know if there is any function which

Re: [PHP-DEV] call_stack

2002-11-27 Thread Sterling Hughes
On Wed, 27 Nov 2002 15:41:25 +0100 (CET) Derick Rethans [EMAIL PROTECTED] wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: Hi! I'm new to this list, I want to know if there is any function which could return the actual call stack, or is it planned to be added? It could be

[PHP-DEV] my own superglobals?

2002-11-27 Thread Alexander Radivanovich
Hi Gurus Is there any way to make my own variables supeglobal like $_GET, $_POST, ... ? I don't like $GLOBALS and I don't want to write the 'global' keyword each time I use my global variable in functions, I want to have a method to make it superglobal by default. 'Superglobal' means that

Re: [PHP-DEV] call_stack

2002-11-27 Thread Andi Gutmans
At 03:41 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: Hi! I'm new to this list, I want to know if there is any function which could return the actual call stack, or is it planned to be added? It could be very useful (for example in my case, now :-).

Re: [PHP-DEV] my own superglobals?

2002-11-27 Thread Andrey Hristov
Hi, this was asked on this list at least once. The answer is no because the design of the language is this. If the user is given the chance to make variables superglobals than in my opinion big mess will come up. It is a mess even with coding by using global statement and global vars. Andrey

Re: [PHP-DEV] my own superglobals?

2002-11-27 Thread Andi Gutmans
Hi, No, this mechanism is only meant for the special variables (see archives of php-dev). In any case, I suggest you do use $GLOBALS[] and not the 'global' keyword because it works better and the recommended way. Andi At 01:06 PM 11/27/2002 +0200, Alexander Radivanovich wrote: Hi Gurus Is

Re: [PHP-DEV] call_stack

2002-11-27 Thread Andi Gutmans
At 07:23 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Andi Gutmans wrote: At 03:41 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: debug_backtrace() will be available in PHP 4.3.0 and higher. if someone has time to implement

Re: [PHP-DEV] call_stack

2002-11-27 Thread George Schlossnagle
I'll do it, if you want. Andi Gutmans wrote: At 07:23 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Andi Gutmans wrote: At 03:41 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: debug_backtrace() will be available in PHP 4.3.0 and

Re: [PHP-DEV] call_stack

2002-11-27 Thread Andi Gutmans
That'd be cool. At 01:32 PM 11/27/2002 -0500, George Schlossnagle wrote: I'll do it, if you want. Andi Gutmans wrote: At 07:23 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Andi Gutmans wrote: At 03:41 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002,

[PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Sara
User complains that maximum length of a line used by fscanf is too short (he has lines 1600 chars). Looking at file.h I agree (it's only 512). The user requested two options: 1) Add an optional length field. No way to do that without breaking parameter list. :( 2) Increase to a larger

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Derick Rethans
On Wed, 27 Nov 2002, Sara Pollita Golemon wrote: User complains that maximum length of a line used by fscanf is too short (he has lines 1600 chars). Looking at file.h I agree (it's only 512). The user requested two options: 1) Add an optional length field. No way to do that without

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Sterling Hughes
User complains that maximum length of a line used by fscanf is too short (he has lines 1600 chars). Looking at file.h I agree (it's only 512). The user requested two options: 1) Add an optional length field. No way to do that without breaking parameter list. :( 2) Increase to a

Re: [PHP-DEV] call_stack

2002-11-27 Thread Brad Fisher
Andi Gutmans wrote: At 03:41 PM 11/27/2002 +0100, Derick Rethans wrote: On Wed, 27 Nov 2002, Miham KEREKES wrote: Hi! I'm new to this list, I want to know if there is any function which could return the actual call stack, or is it planned to be added? It could be very useful

Re: [PHP-DEV] call_stack

2002-11-27 Thread Andi Gutmans
I'd probably go for class::function($arg1, $arg2). Also take into consideration that the args aren't always available. Andi At 02:58 PM 11/27/2002 -0500, George Schlossnagle wrote: Is there a concensus on how arguments should be printed out? I'm shooting right now for a 'cluck' style backtrave

Re: [PHP-DEV] call_stack

2002-11-27 Thread Miham KEREKES
Is there a concensus on how arguments should be printed out? I'm shooting right now for a 'cluck' style backtrave class::function() called at file:line Perhaps class::function() called at file:line Arguments: print_r(args) ?? Well, probably the following: class::function()

[PHP-DEV] Re: Weird PHP Problem

2002-11-27 Thread colin mcdonald
Try Looking at this parameter in the php.ini: ; Valid range 0 - 2147483647. Default = 4096. mssql.textlimit = 65536 ; Valid range 0 - 2147483647. Default = 4096. mssql.textsize = 65536 colin Becky Gruebmeyer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Re: [PHP-DEV] call_stack

2002-11-27 Thread George Schlossnagle
Hmmm any hints on how to get the variable name out of the stack? The code in debug_backtrace seems to only extract the value. George Andi Gutmans wrote: I'd probably go for class::function($arg1, $arg2). Also take into consideration that the args aren't always available. Andi At 02:58

Re: [PHP-DEV] call_stack

2002-11-27 Thread Andi Gutmans
At 03:13 PM 11/27/2002 -0500, George Schlossnagle wrote: Hmmm any hints on how to get the variable name out of the stack? The code in debug_backtrace seems to only extract the value. There's no way but I don't think it's needed. When I wrote $arg1 I meant the value not the name of the

Re: [PHP-DEV] call_stack

2002-11-27 Thread George Schlossnagle
Ok... but that looks nasty when you are passed an array or an object. Andi Gutmans wrote: At 03:13 PM 11/27/2002 -0500, George Schlossnagle wrote: Hmmm any hints on how to get the variable name out of the stack? The code in debug_backtrace seems to only extract the value. There's no

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Moriyoshi Koizumi
Derick Rethans [EMAIL PROTECTED] wrote: On Wed, 27 Nov 2002, Sara Pollita Golemon wrote: User complains that maximum length of a line used by fscanf is too short (he has lines 1600 chars). Looking at file.h I agree (it's only 512). The user requested two options: 1) Add an

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Sterling Hughes
I don't like us adding a new ini entry for this, I think we should try another option: 4) Make sure we can use fscanf on a dynamically sized buffer. This will definitely the hardest solution, but also the most beautiful one. I like this fourth option, because the internal scanf

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Derick Rethans
On Thu, 28 Nov 2002, Moriyoshi Koizumi wrote: Derick Rethans [EMAIL PROTECTED] wrote: I don't like us adding a new ini entry for this, I think we should try another option: 4) Make sure we can use fscanf on a dynamically sized buffer. This will definitely the hardest solution, but

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Moriyoshi Koizumi
err. it didn't need a reimplementation, i fixed it, it works fine in cvs. Then, ?php $buf = 123 456 \0 567 sscanf($buf, %d%d%s%d, $a, $b, $c, $d); var_dump($a, $b, $c, $d); ? How about this? The result was the same as for fscanf. Moriyoshi -Sterling Moriyoshi Derick

Re: [PHP-DEV] call_stack

2002-11-27 Thread Andi Gutmans
At 03:18 PM 11/27/2002 -0500, George Schlossnagle wrote: Ok... but that looks nasty when you are passed an array or an object. Yeah but backtraces tend to look nasty :) Andi Andi Gutmans wrote: At 03:13 PM 11/27/2002 -0500, George Schlossnagle wrote: Hmmm any hints on how to get

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Sterling Hughes
err. it didn't need a reimplementation, i fixed it, it works fine in cvs. Then, ?php $buf = 123 456 \0 567 sscanf($buf, %d%d%s%d, $a, $b, $c, $d); var_dump($a, $b, $c, $d); ? How about this? The result was the same as for fscanf. Yes, but it didn't need a reimplementation

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Moriyoshi Koizumi
Sterling Hughes [EMAIL PROTECTED] wrote: err. it didn't need a reimplementation, i fixed it, it works fine in cvs. Then, ?php $buf = 123 456 \0 567 sscanf($buf, %d%d%s%d, $a, $b, $c, $d); var_dump($a, $b, $c, $d); ? How about this? The result was the same as

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Sara
Derick Rethans [EMAIL PROTECTED] wrote: I don't like us adding a new ini entry for this, I think we should try another option: 4) Make sure we can use fscanf on a dynamically sized buffer. This will definitely the hardest solution, but also the most beautiful one. I'll admit to not

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Sterling Hughes
Derick Rethans [EMAIL PROTECTED] wrote: I don't like us adding a new ini entry for this, I think we should try another option: 4) Make sure we can use fscanf on a dynamically sized buffer. This will definitely the hardest solution, but also the most beautiful one. I'll

Re: [PHP-DEV] Bug #20460 (Feature Request)

2002-11-27 Thread Derick Rethans
On Wed, 27 Nov 2002, Sara Pollita Golemon wrote: Derick Rethans [EMAIL PROTECTED] wrote: I don't like us adding a new ini entry for this, I think we should try another option: 4) Make sure we can use fscanf on a dynamically sized buffer. This will definitely the hardest

[PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Sara
While waiting for opinions on Bug#20460 I went ahead and addressed #20308. User complains that parse_url returns the full email address in 'path' element. Makes reference to documents which claim it should return 'user' and 'host' element. To address this request and maintain backward

Re: [PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Sterling Hughes
While waiting for opinions on Bug#20460 I went ahead and addressed #20308. User complains that parse_url returns the full email address in 'path' element. Makes reference to documents which claim it should return 'user' and 'host' element. To address this request and maintain backward

Re: [PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Ilia A.
I am not so sure that adding special cases for things like mailto: and so on is a good idea. The code works identically to how it worked in 4.2.3 and prior. Ilia On November 27, 2002 04:19 pm, Sara Pollita Golemon wrote: While waiting for opinions on Bug#20460 I went ahead and addressed

[PHP-DEV] PHP urlencode() - JAVA

2002-11-27 Thread Robert Strohmaier
Hi I nedd to know, what command matches best with urlencode() from PHP. Is it encodeURL() or encodeRedirectURL() or something else. thx for your help mfg Robert -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Sara
That was one of the comments I was looking for Is this really necessary? After all the user can certainly use explode() to take it apart. I'm not against giving him that answer, it was just a quick patch to write... Is that a -1 then? I am not so sure that adding special cases for things like

Re: [PHP-DEV] call_stack

2002-11-27 Thread Sebastian Bergmann
George Schlossnagle wrote: Is there a concensus on how arguments should be printed out? I quite like the output of foreach ($backtrace as $step) { if (!empty($step['args'])) { foreach ($step['args'] as $arg) { $args = isset($args) ? $args . ', ' : '';

Re: [PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Ilia A.
On November 27, 2002 04:45 pm, Sara Pollita Golemon wrote: That was one of the comments I was looking for Is this really necessary? After all the user can certainly use explode() to take it apart. I'm not against giving him that answer, it was just a quick patch to write... Is that a -1

Re: [PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Sterling Hughes
On November 27, 2002 04:45 pm, Sara Pollita Golemon wrote: That was one of the comments I was looking for Is this really necessary? After all the user can certainly use explode() to take it apart. I'm not against giving him that answer, it was just a quick patch to write... Is that a

[PHP-DEV] Parse search string a la Google (Regular expression?)

2002-11-27 Thread Benny Rasmussen
Hi, In my application I would like to offer a search interface like Google and other popular search engines. The complication for me is to explode the search string into proper array elements, like this: $search_str = \search for this sentence\ -NotForThisWord ButDefinitelyForThisWord;

Re: [PHP-DEV] Bug #20308 (Feature Request)

2002-11-27 Thread Ilia A.
On November 27, 2002 04:32 pm, Sterling Hughes wrote: On November 27, 2002 04:45 pm, Sara Pollita Golemon wrote: That was one of the comments I was looking for Is this really necessary? After all the user can certainly use explode() to take it apart. I'm not against giving him that

Re: [PHP-DEV] call_stack

2002-11-27 Thread George Schlossnagle
Here's first shot at a patch. The output it generates is ugly as sin if you use objects though. I though about flattening them out, but that gets long and nasty (and requires specialized print functions which while easy seem to be of marginal use elsewhere.) George Index:

Re: [PHP-DEV] call_stack

2002-11-27 Thread George Schlossnagle
And here is a version which flattens the calling args onto a single line (similar to sebastians usersapce script). Longer, but a bit prettier output. Index: Zend/zend.c === RCS file: /repository/Zend/zend.c,v retrieving revision

[PHP-DEV] Reusing PHP string value pointers

2002-11-27 Thread Marshall A. Greenblatt
Apologies in advance if this is the wrong mailing list. Please direct me to a more appropriate mailing list if there is one :-) When a PHP string variable is changed via a PHP script, such as: $foo = 'new value'; what happens to the `value.str.val' pointer internally? Is it possible to have

Re: [PHP-DEV] Parse search string a la Google (Regular expression?)

2002-11-27 Thread Sebastian Bergmann
Benny Rasmussen wrote: Hi, In my application I would like to offer a search interface like Google and other popular search engines. The complication for me is to explode the search string into proper array elements, like this: $search_str = \search for this sentence\ -NotForThisWord

[PHP-DEV] PHP 4.3.0RC2 released

2002-11-27 Thread Andrei Zmievski
The second release candidate of the inimitably fabulous PHP version 4.3.0 is out. It can be downloaded from http://qa.php.net. Give it a good testing! -Andrei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] PHP Memory Error

2002-11-27 Thread Jonathan Williams
Could someone please help. Running Linux 7.3 RH with 512 MB Ram with Apache and PHP 4. I receive the following error and was wondering if anyone had any suggestions. The error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in

Re: [PHP-DEV] PHP Memory Error

2002-11-27 Thread .: B i g D o g :.
in your php.ini file you have allocated only 8mb for use... this is probably not sufficient for your scripts to use... remember that this size is in bytes... you might want something like this... 67108860 bytes = 64 mb Jonathan Williams [EMAIL PROTECTED] wrote in message [EMAIL

RE: [PHP-DEV] PHP Memory Error

2002-11-27 Thread John Coggeshall
67108860 bytes = 64 mb 64M will also work, I believe. John Jonathan Williams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Could someone please help. Running Linux 7.3 RH with 512 MB Ram with Apache and PHP 4. I receive the following error and was

RE: [PHP-DEV] PHP Memory Error

2002-11-27 Thread Philip Olson
I started a faq on this but anyway one can use K (kilobytes) or M (megabytes) for these type of directives. A plain integer == Bytes. Regards, Philip On Wed, 27 Nov 2002, John Coggeshall wrote: 67108860 bytes = 64 mb 64M will also work, I believe. John Jonathan Williams