Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-11 Thread Andi Gutmans
You seem to be right. I commited a patch. Please take a look and see if it solves your problems. At 11:02 PM 7/11/2004 -0700, Kamesh Jayachandran wrote: Hi Moriyoshi, Fine. Correcting myself. Only once global_class_table is allocated and each thread just increments the individual zend_class_entry

Re: [PHP-DEV] issue in copying the hash table(Reposted third time)

2004-07-11 Thread Kamesh Jayachandran
Hi Moriyoshi, Fine. Correcting myself. Only once global_class_table is allocated and each thread just increments the individual zend_class_entry while making a copy. In linux I never faced the problem. I can not say it as a problem with NetWare. As per concept trying to copy sizeof(zend_class_e

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Sebastian Bergmann
Andi Gutmans wrote: How about default($var, expr)? It might be a good idea to decide on a name for the construct before the PHP 5.0.0 release in order to make it a reserved word (marked for future use). -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.d

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Jason Garber
AG> How about default($var, expr)? I like it. -Jason -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re[3]: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Jason Garber
Sunday, July 11, 2004, 10:48:06 PM, you wrote: RL> On Sun, 11 Jul 2004, Jason Garber wrote: >> The concept is desirable, but can be achieved if you need it just as >> simply using already available syntax (ie a cast): >> >> $level = (integer) value($_SESSION['level'], 1); RL> The problem with that

Re: [PHP-DEV] Re: Memory manager

2004-07-11 Thread Andi Gutmans
When did you try that? Did you check with latest CVS because Wez made some fixes. At 09:37 PM 7/11/2004 +, Curt Zirzow wrote: * Thus wrote Andi Gutmans: > I think I'll roll on Monday. There's still a patch lingering. > Does anyone else have something to commit? > This is completely broke: fil

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Andi Gutmans
How about default($var, expr)? Andi At 09:43 AM 7/11/2004 -0700, Rasmus Lerdorf wrote: On Sun, 11 Jul 2004, Marcus Boerger wrote: > $a = ifsetor($_GET['index'], $default); ifsetor() sounds a bit cumbersome to me. Some other suggestions: $a = is($_GET['index'], $default); $a = isor($_GET['

Re[2]: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Rasmus Lerdorf
On Sun, 11 Jul 2004, Jason Garber wrote: > The concept is desirable, but can be achieved if you need it just as > simply using already available syntax (ie a cast): > > $level = (integer) value($_SESSION['level'], 1); The problem with that is this: $level = (int) value($_SESSION['level'); Assu

Re[2]: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Jason Garber
Hello, RL> $a = value($_GET['index'], $default); value() sounds like more like a "language construct" to me. I'm not sure if it accurately conveys the meaning though (not that it has stopped other functions from being added in the past :) -- Best regards, Jasonm

Re[2]: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Jason Garber
Hello Marc, MR> I don't think a function named param() really fits, but I do like the MR> idea of adding a type check (or in the case of PHP a type cast) to the MR> function. MR> $level = (int) (isset($_SESSION['level']) ? $_SESSION['level'] : MR> (isset($_REQUEST['level']) ? $_REQUEST['level']

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Rasmus Lerdorf
On Sun, 11 Jul 2004, Marc Richards wrote: > Marc Richards wrote: > > > I don't think a function named param() really fits, but I do like the > > idea of adding a type check (or in the case of PHP a type cast) to the > > function. > > > > > > $level = (int) (isset($_SESSION['level']) ? $_SESSION['l

Re: [PHP-DEV] Bug in preg_match() ?

2004-07-11 Thread Curt Zirzow
* Thus wrote Michael Spector: > > Hi, > > This script: > > $line = "Use operator m// for matching strings"; > $pattern = "m//"; > > if(preg_match("/$pattern/", $line, $match)) { > print $match[0]."\n"; > } > ?> > > outputs the following error: >

Re: [PHP-DEV] Bug in preg_match() ?

2004-07-11 Thread Nuno Lopes
> Hi, > > This script: > > $line = "Use operator m// for matching strings"; > $pattern = "m//"; > > if(preg_match("/$pattern/", $line, $match)) { > print $match[0]."\n"; > } > ?> There is no bug here! The final pattern is "/m///". When using // as

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Marc Richards
Marc Richards wrote: I don't think a function named param() really fits, but I do like the idea of adding a type check (or in the case of PHP a type cast) to the function. $level = (int) (isset($_SESSION['level']) ? $_SESSION['level'] : (isset($_REQUEST['level']) ? $_REQUEST['level'] : 1)) bec

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Marc Richards
Sean Coates wrote: Not meaning to add more confusion, but Coldfusion (yes yes, please keep laughter to a minimum) has had a similar function since the beginning (IIRC). it's http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b13.htm Perhaps a php function "param(...)" ? Even though it'

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Curt Zirzow
* Thus wrote Rasmus Lerdorf: > On Sun, 11 Jul 2004, Marcus Boerger wrote: > > > $a = ifsetor($_GET['index'], $default); > > ifsetor() sounds a bit cumbersome to me. > > ... > > $a = value($_GET['index'], $default); I like value() although it might be a bit too generic, maybe add a word t

Re: Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Sterling Hughes
On Sun, 11 Jul 2004 09:43:51 -0700 (PDT), Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > On Sun, 11 Jul 2004, Marcus Boerger wrote: > > > $a = ifsetor($_GET['index'], $default); > > ifsetor() sounds a bit cumbersome to me. > > Some other suggestions: > > $a = is($_GET['index'], $default); >

[PHP-DEV] Bug in preg_match() ?

2004-07-11 Thread Michael Spector
Hi, This script: outputs the following error: Warning: Unknown modifier '/' in /home/michael/bug.php on line 5 I thought it should find the match "m//" ... Can you say, why search of the ending delimiter in a pattern cannot be performed in a simple way, as you can see in the attached pa

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Sean Coates
Not meaning to add more confusion, but Coldfusion (yes yes, please keep laughter to a minimum) has had a similar function since the beginning (IIRC). it's http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b13.htm Perhaps a php function "param(...)" ? Even though it's not always a req

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Marc Richards
Ilya Sher wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 firstset() is most logical name (at least for me) | The problem with firstset() is that it doesn't make as much sense if we are only testing one variable...but that is still to be determined. Marc -- PHP Internals - PHP Runtime Devel

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Rasmus Lerdorf
On Sun, 11 Jul 2004, Marcus Boerger wrote: > $a = ifsetor($_GET['index'], $default); ifsetor() sounds a bit cumbersome to me. Some other suggestions: $a = is($_GET['index'], $default); $a = isor($_GET['index'], $default); $a = valid($_GET['index'], $default); $a = value($_G

Re: [PHP-DEV] New construct discussion Summary (was: what happened to that new isset() like language construct)

2004-07-11 Thread Marcus Boerger
Hello Marc, Sunday, July 11, 2004, 4:49:57 AM, you wrote: > Ok, so let me try to do a little summary. > If and When > --- > 1) There seems to be a general consensus that this feature should be > implemented in SOME way. > 2) It was too late for 5.0.0 so it will be targeted for 5.1 >

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Cris H
--- Marc Richards <[EMAIL PROTECTED]> wrote: > 3) So this leaves a function call which begs two questions: > What do we call it, [snip] > These include: ifset(), ifelse(), ifexists() and [snip] > nvl(), ifnull() and coalesce() have been proposed because of > This currently leaves us with a hand ful

Re: [PHP-DEV] PHP 5.0 crash on long php script with over 1000 lines

2004-07-11 Thread Gunnar von Boehn
Hi Zeev, No, I did not try the latest CVS yet. Actually I'm using a MorphOS PHP build which was made by a friend of mine. As you point out that the current CVS might fix this problem, we will try it out on MorphOS. I'll report back to you. (Hopefully success :-) ) Kind regards Gunnar On Jul 11,

Re: [PHP-DEV] PHP 5.0 crash on long php script with over 1000 lines

2004-07-11 Thread Zeev Suraski
Gunnar, Did you try the latest CVS after Wez wrote his reply? Zeev At 16:52 10/07/2004, Gunnar von Boehn wrote: Hi, Please file a bugreport. Good idea :) I just wrote a bugreport. If anyone has an idea why PHP crashes so early on MorphOS and how this could be fixed , then i'll be very thankful. Che

Re: [PHP-DEV] New construct discussion Summary

2004-07-11 Thread Ilya Sher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Marc Richards wrote: | Ok, so let me try to do a little summary. | | | If and When | --- | 1) There seems to be a general consensus that this feature should be | implemented in SOME way. | 2) It was too late for 5.0.0 so it will be targeted for