Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Rasmus Lerdorf
jvlad wrote: > Meanwhile I see that php core developers and Evangelist propose the way of > evolving difficulties. > For example, I used split() for many many years. Now it throws a warning and > it appears > that this function will be removed soon. I have to rewrite all my scripts > and replace

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Rasmus Lerdorf
jvlad wrote: >> $a = array(1); >> $b = 0; >> $c = &$b; >> foreach($a as $c); >> Now you are arguing that $b should not be 1? >> The two pieces of code are identical > > It's just a nightmare example. I wonder have you ever see anything like this > in real life? > Could you please let me see it to

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread jvlad
> > No chance. No .ini settings, and I still maintain it is inconsistent. > > So, if I write this: > > $a = array(1); > $b = 0; > $c = &$b; > $c = $a[0]; > > Would you agree that $b should be 1 at this point? If so, just because > I rewrite that code like this: > > $a = array(1); > $b = 0; > $c =

Re: [PHP-DEV] Test OpenGrok installation (LXR replacement?)

2009-12-27 Thread Philip Olson
On Dec 27, 2009, at 1:17 PM, Michael Maclean wrote: > Hi, > Since LXR hasn't been updating since the shift to SVN, I've been > investigating bringing it back. Today, though, I came across OpenGrok which > appears to be a far more modern implementation of the same thing, using > Lucene as the b

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Rasmus Lerdorf
jvlad wrote: > "Rasmus Lerdorf" wrote in message > news:4b3785ac.2000...@lerdorf.com... >> We can't just randomly reset variables based on their scope in this one >> specific case. If we are going to "fix" this, it should be done by >> introducing a way to do proper local scope variables. Reset

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread jvlad
"Rasmus Lerdorf" wrote in message news:4b3785ac.2000...@lerdorf.com... > We can't just randomly reset variables based on their scope in this one > specific case. If we are going to "fix" this, it should be done by > introducing a way to do proper local scope variables. Resetting a > reference s

Re: [PHP-DEV] Test OpenGrok installation (LXR replacement?)

2009-12-27 Thread Pierre Joye
hi, On Sun, Dec 27, 2009 at 10:17 PM, Michael Maclean wrote: > Hi, > Since LXR hasn't been updating since the shift to SVN, I've been > investigating bringing it back. Today, though, I came across OpenGrok which > appears to be a far more modern implementation of the same thing, using > Lucene as

[PHP-DEV] Test OpenGrok installation (LXR replacement?)

2009-12-27 Thread Michael Maclean
Hi, Since LXR hasn't been updating since the shift to SVN, I've been investigating bringing it back. Today, though, I came across OpenGrok which appears to be a far more modern implementation of the same thing, using Lucene as the back end. I've set up a test installation of it at http://php-o

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Mike Wacker
Rasmus Lerdorf wrote: We can't just randomly reset variables based on their scope in this one specific case. If we are going to "fix" this, it should be done by introducing a way to do proper local scope variables. Resetting a reference simply because it is convenient in this one case would be

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Rasmus Lerdorf
We can't just randomly reset variables based on their scope in this one specific case. If we are going to "fix" this, it should be done by introducing a way to do proper local scope variables. Resetting a reference simply because it is convenient in this one case would be completely inconsistent.

[PHP-DEV] Are there zend classes "hidden" from php?

2009-12-27 Thread Hans-Peter Oeri
Hi! As some already know, I'm using the holidays to prepare a proposal for error handling in extensions (https://saintcyr.oeri.ch/trac/php-intl/wiki/ErrorHandling). Digging through many zend internals, I wonder if there is a possibility to use a common ancestor class without cluttering namespaces

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Ferenc Kovacs
On Sun, Dec 27, 2009 at 3:11 PM, Mike Wacker wrote: > Adam Harvey wrote: >> >> 2009/12/27 Mike Wacker : >>> >>> PHP's documentation for foreach states that if you iterate by reference >>> [foreach ($ii as &$i) ...], you should unset $i after the loop.  $i still >>> points to the last element of th

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Mike Wacker
Adam Harvey wrote: 2009/12/27 Mike Wacker : PHP's documentation for foreach states that if you iterate by reference [foreach ($ii as &$i) ...], you should unset $i after the loop. $i still points to the last element of the array - updating $i or reusing it will update the last element of the ar

Re: [PHP-DEV] PHP6's future

2009-12-27 Thread Mike Wacker
Chris Stockton wrote: Hello, On Mon, Nov 16, 2009 at 6:13 PM, Kalle Sommer Nielsen wrote: But what is every ones input on the matter of attempting to boost PHP6's development? I'm willing to give my part in whatever I can to help getting up on the feet to get this ball rolling. I think that

Re: [PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Adam Harvey
2009/12/27 Mike Wacker : > PHP's documentation for foreach states that if you iterate by reference > [foreach ($ii as &$i) ...], you should unset $i after the loop.  $i still > points to the last element of the array - updating $i or reusing it will > update the last element of the array. > > In sh

[PHP-DEV] Unsetting loop variables at the end of the loop

2009-12-27 Thread Mike Wacker
PHP's documentation for foreach states that if you iterate by reference [foreach ($ii as &$i) ...], you should unset $i after the loop. $i still points to the last element of the array - updating $i or reusing it will update the last element of the array. In short, why doesn't PHP automatical