Page 2 of 2

Posted: Tue May 23, 2006 8:34 pm
by Ambush Commander
It doesn't. So, logically speaking then, there wouldn't be block scoping. Heck, PHP doesn't even have blocks. Not that I've ever needed them though...

Posted: Tue May 23, 2006 9:02 pm
by alex.barylski
Ambush Commander wrote:It doesn't. So, logically speaking then, there wouldn't be block scoping. Heck, PHP doesn't even have blocks. Not that I've ever needed them though...
I'll admit...the useful-ness is rare, but I spend a majority of my time thinking of new ways of solving old problems...

I often push every technology I tinker with to the limits...

In this case...scope blocks would have been something to continue playing with as it might have led to something kinda neat :)

Cheers :)

Posted: Wed May 24, 2006 6:16 am
by Chris Corbyn
Hockey wrote:
arborint wrote:I don't think block scope is crazy, regardless of its actual usefulnes. It is that you need scope operators like my or our to do that and there aren't any in PHP.
I have never heard of scope operators like *my* or *our*

How would they play a role in what I was trying to do?

I simply needed an object to destruct like what I am accustomed too tis all :)
My and our are used in Perl programming. Typically when you do something like loop over a hash table and you don't need to do anything once the loop is finished. I really must brush up on my perl again... comes in handy sometimes :)