Re: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Peter Ford
Stuart wrote: (among other things)
 If you ask me you are essentially describing engineers (or doers) as
 idiots and salespeople as morons. I won't debate the labels but
 unfortunately it's a fact of life that most management types in this
 world are ex-sales because they're the ones who know how to use their
 skills to further their career which them in a position to favour
 sales over engineering when it comes to salary and rewards.
 

I think you'll find it's because the engineers like engineering and not
managing, so they (if they can get away with it) avoid or decline the
opportunities for promotion to management.

ISTR the Royal Air Force has a Specialist Aircrew track where the really good
pilots, who wanted to fly planes rather than desks, could be promoted to
management ranks but avoid the management duties.
I had the pleasure of meeting one of these chaps when I was at university - he
had more flying hours than I had lived and flown just about everything with
wings. A superb instructor, but far too much of a livewire to be a manager...

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Ben Dunlap
 ISTR the Royal Air Force has a Specialist Aircrew track where the really 
 good
 pilots, who wanted to fly planes rather than desks, could be promoted to
 management ranks but avoid the management duties.

They had a position like this at the first big company I worked for --
Member of the Technical Staff. These folks were very good at what
they did, but again, not interested in, or perhaps not suited for,
management.

Ben

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: unset() something that doesn't exist

2009-08-27 Thread Bob McConnell
From: Ben Dunlap

 ISTR the Royal Air Force has a Specialist Aircrew track where the
really good
 pilots, who wanted to fly planes rather than desks, could be promoted
to
 management ranks but avoid the management duties.
 
 They had a position like this at the first big company I worked for --
 Member of the Technical Staff. These folks were very good at what
 they did, but again, not interested in, or perhaps not suited for,
 management.

The US military structure calls these technical specialists Warrant
Officers. But there are very few positions that qualify. There is one
retired WO down the hall from me. He flew sky hook style helicopters
for the US Army.

There have been numerous discussions over the years about how to reward
people who know how to manage information and knowledge better than they
can manage people. There have been Staff Scientists at some companies
which were actually senior engineers. Bob Pease at National
Semiconductor is one example. But this only seems to work at large
companies. I think the biggest problem is that HR types don't want to
acknowledge these types of people exist. It doesn't fit their nice
little arrangement of pigeon holes.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread tedd

At 11:34 PM +0100 8/25/09, Stuart wrote:

2009/8/25 tedd tedd.sperl...@gmail.com:

  I can't believe that you are wasting time on this. This guy is beyond

 clueless.


To be fair tedd English is clearly not his main language and I can see
how you could misunderstand the original question as he did. What I
objected to was that he took what he interpreted as the question being
asked, saw that it did in fact behave that way and then proceeded to
completely fabricate an explanation as to why it does so when that
explanation does little more than demonstrate that he clearly has no
understanding of what's actually going on. I can't stand people who
claim to know what they're talking about when they're really making it
up as they go along.

Actually, an explanation like that does do a lot more than demonstrate
ignorance. It gives naive observers of this thread, now and in the
future, incorrect information that they may potentially rely upon if
nobody corrects it. That's why I'm wasting my time on this - I do it
for the greater good.

Hmm, maybe I just need a holiday...

-Stuart

--
http://stut.net/


-Stuart:

I understand the language problem and how someone might use incorrect 
diction when speaking/writing English, but php is not English 
dependant.


When someone says that unset(); does not work and provides an example 
that clearly demonstrates they don't know how to use it, then I throw 
up my hands and say RFTM in whatever language it's available. So, I 
wasn't objecting to the OP original statement but rather his proof 
that unset() wasn't working. You and I are objecting to the same 
thing.


My hat is off to you for contributing to the greater good, but your 
efforts might be better spent attending to the needs of higher level 
idiots (like myself) and let us middle level idiots attend to the 
idiots, if you get my drift. :-)


My comment is only a suggestion for you to consider. From my 
perspective, I hate to see such a valuable resource as yourself 
wasted on the clueless.


And, we all need a holiday...

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Stuart
2009/8/26 Ralph Deffke ralph_def...@yahoo.de:
 sorry I mixed 'set' with 'given' and if my mistake did prevent all the
 smarter guys to give u an answer I'm sorry too.

 I hope not to be too limited to give u an answer

 well, think about how PHP 5 works.
 $a e.g. is a REFENCE to some memory where the variable resides.

 so the interpreter running into this unset() statement searches the
 reference table to find the pointer named $a to delete its name from the
 reference table. it doesn't find it, but it's ment to unset it anyway, why
 should be complained about it. in the next line the $a is not set, as u want
 it.

 mmmh nice as well that nobody told me direcly that I mixed set with given

Excuse me? I told you as soon as I knew that's why you were getting it so wrong.

 ps.: great behavior, I think for less then 10% of the world population is
 english the native language, such a behavior prevents very good and smart
 programmers arround the world to share their knowledge.

I actually think it's perfectly reasonable to expect people
contributing to this mailing list to have a good grasp of the English
language... at least enough not to make errors like the one you have
here. I understand how rude it can appear but I think it's important
that information resources such as this are as reliable as possible,
and if that means you need to be a bit more careful about asserting
your expertise when there's a chance that you've misunderstood the
question. I see no difference between misunderstanding due to language
issues and misunderstanding due to having not read the question
correctly. They both have the same effect.

Maybe I'm being too harsh. I'm sure you have a lot of knowledge to
share, but if you want to participate in what is an English mailing
list please be more careful in future.

Now, on to my real problem with the way you answered the question.
After your initial mistake you proceeded to, as far as I can tell,
completely fabricate a reason for the behaviour you were seeing with
absolutely nothing to back it up whatsoever. And then, despite being
corrected you repeated it. That's what I really objected to - anyone
can misunderstand a question, but filling in the blanks from thin air
helps nobody. Ever.

And that's all I've got to say about that. Now, about that holiday...

-Stuart

-- 
http://stut.net/

 Tom Worster f...@thefsb.org wrote in message
 news:c6b93df9.114fa%...@thefsb.org...
 On 8/25/09 5:00 AM, Ralph Deffke ralph_def...@yahoo.de wrote:

  of course its a syntax error, because unset() IS NOT A FUNCTION its a
  language construct

 that's hard to believe. i can't imagine how the compiler could reliably
 predict if the argument will be set or not when the unset line is
 executed.


  Stuart stut...@gmail.com wrote in message
  news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
  2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
  causes an error
  Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
 `'$''
  in
  C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
  This is a syntax error, not a runtime error. You've clearly done
  something wrong.
 
  Tom Worster f...@thefsb.org wrote in message
  news:c6b87877.11463%...@thefsb.org...
  is it the case that unset() does not trigger an error or throw an
  exception
  if it's argument was never set?
 
  Absolutely.
 
  -Stuart
 
  --
  http://stut.net/
 
 





 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Stuart
2009/8/26 tedd tedd.sperl...@gmail.com:
 At 11:34 PM +0100 8/25/09, Stuart wrote:

 2009/8/25 tedd tedd.sperl...@gmail.com:

   I can't believe that you are wasting time on this. This guy is beyond

  clueless.

 To be fair tedd English is clearly not his main language and I can see
 how you could misunderstand the original question as he did. What I
 objected to was that he took what he interpreted as the question being
 asked, saw that it did in fact behave that way and then proceeded to
 completely fabricate an explanation as to why it does so when that
 explanation does little more than demonstrate that he clearly has no
 understanding of what's actually going on. I can't stand people who
 claim to know what they're talking about when they're really making it
 up as they go along.

 Actually, an explanation like that does do a lot more than demonstrate
 ignorance. It gives naive observers of this thread, now and in the
 future, incorrect information that they may potentially rely upon if
 nobody corrects it. That's why I'm wasting my time on this - I do it
 for the greater good.

 Hmm, maybe I just need a holiday...

 -Stuart

 --
 http://stut.net/

 -Stuart:

 I understand the language problem and how someone might use incorrect
 diction when speaking/writing English, but php is not English dependant.

 When someone says that unset(); does not work and provides an example that
 clearly demonstrates they don't know how to use it, then I throw up my hands
 and say RFTM in whatever language it's available. So, I wasn't objecting to
 the OP original statement but rather his proof that unset() wasn't
 working. You and I are objecting to the same thing.

 My hat is off to you for contributing to the greater good, but your
 efforts might be better spent attending to the needs of higher level idiots
 (like myself) and let us middle level idiots attend to the idiots, if you
 get my drift. :-)

 My comment is only a suggestion for you to consider. From my perspective, I
 hate to see such a valuable resource as yourself wasted on the clueless.

 And, we all need a holiday...

Apparently a holiday is out of the question, so I've decided to change
jobs instead. A new environment, that's all I need.

Loving your view of this list as a hierarchy of idiots btw, I think
that works as a description for a lot of places.

-Stuart

-- 
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread tedd

At 2:12 PM +0100 8/26/09, Stuart wrote:

2009/8/26 tedd tedd.sperl...@gmail.com:

  And, we all need a holiday...

Apparently a holiday is out of the question, so I've decided to change
jobs instead. A new environment, that's all I need.

Loving your view of this list as a hierarchy of idiots btw, I think
that works as a description for a lot of places.

-Stuart



-Stuart:

I hope your new job still includes this list.

As for the hierarchy of idiots, but of course -- if we weren't 
idiots we would be doing something that made lot's of money.


I had a client say to me once If you're so smart, then why aren't 
you rich? I answered quickly What makes you think I'm not? But 
privately his comment cut me to the quick. There was no question that 
much dumber people than me (according to me) were making far more 
bucks than I was.


So, who's the smart one? Is it the guy that went to college to get 
three degrees to work his ass off for a moron who pays a a fraction 
of what he makes on the deal? Or is it the moron who sniffs out the 
deal and gets idiots to work for him?


It appears that the world is made up of morons and idiots -- the 
problem is that idiots do all the work and morons make all the money. 
The smarter the idiot, the more work that's available. The craftier 
the moron, the more money they make and thus the more idiots they 
hire.


As for me, sometimes I'm an idiot and other times I'm a moron. But 
what I really would like to be is retired so I could do this for a 
hobby.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Paul M Foster
On Wed, Aug 26, 2009 at 10:08:35AM -0400, tedd wrote:

 2009/8/26 tedd tedd.sperl...@gmail.com:

snip

 I had a client say to me once If you're so smart, then why aren't
 you rich? I answered quickly What makes you think I'm not? But
 privately his comment cut me to the quick. There was no question that
 much dumber people than me (according to me) were making far more
 bucks than I was.

I've had people say or imply this to me. Here's my take on it: I'm
absolutely certain that I'm easily smart enough to be rich. Why aren't
I? Because I've just never been that interested in making a lot of
money. Of course, I can see the advantages of being rich, and of course,
I'd like to be. But I've never placed that much importance on it. I'm
much more interested in doing something I like (programming), running my
own business (and not having to answer to a boss who's an idiot) and
having a great marriage to a woman I can spend hours talking about
nothing to. Etc.

My step-brother is a smart guy. He spends all his waking time trying to
figure out how to make more money. He's rich. I don't, and I'm not.

It's okay. I don't mind.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread sono-io


On Aug 26, 2009, at 9:28 AM, Paul M Foster wrote:


and having a great marriage to a woman I can spend hours talking about
nothing to.


I'm jealous.  Does she have a sister who's not spoken for?  =;)

Frank

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Tom Worster
On 8/25/09 5:01 AM, Stuart stut...@gmail.com wrote:

 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
 causes an error
 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in
 C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
 This is a syntax error, not a runtime error. You've clearly done
 something wrong.
 
 Tom Worster f...@thefsb.org wrote in message
 news:c6b87877.11463%...@thefsb.org...
 is it the case that unset() does not trigger an error or throw an
 exception
 if it's argument was never set?
 
 Absolutely.
 
 -Stuart

thank you, stuart.

in the interest of wrapping up the archive of this thread on topic, may i
summarize?

in a statement like:

unset($something);

if $something is not set, i.e. isset($something) would, in the same context,
evaluate to false, the statement WILL NOT trigger an error at any level or
throw an exception.

the reason i ask is this: sometimes it's important to unset a variable at a
position in a script where as programmer i don't know if the variable is set
or not. session variables are good examples. i sure don't what reports of
such unsets in my php error logs. but i also don't want to do:

if (isset($something)) unset($something);

if i don't need to.

and the answer is: i don't.


tom



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Paul M Foster
On Wed, Aug 26, 2009 at 09:52:49AM -0700, sono...@fannullone.us wrote:


 On Aug 26, 2009, at 9:28 AM, Paul M Foster wrote:

 and having a great marriage to a woman I can spend hours talking about
 nothing to.

   I'm jealous.  Does she have a sister who's not spoken for?  =;)

She and her sister are about as different as lions and cabbages. ;-}

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread hack988 hack988
this post is away from the point :),but everyone's reply is interesting

2009/8/27 Paul M Foster pa...@quillandmouse.com:
 On Wed, Aug 26, 2009 at 09:52:49AM -0700, sono...@fannullone.us wrote:


 On Aug 26, 2009, at 9:28 AM, Paul M Foster wrote:

 and having a great marriage to a woman I can spend hours talking about
 nothing to.

       I'm jealous.  Does she have a sister who's not spoken for?  =;)

 She and her sister are about as different as lions and cabbages. ;-}

 Paul

 --
 Paul M. Foster

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Paul M Foster
On Thu, Aug 27, 2009 at 02:27:32AM +0800, hack988 hack988 wrote:

 this post is away from the point :),but everyone's reply is interesting
 
 2009/8/27 Paul M Foster pa...@quillandmouse.com:
  On Wed, Aug 26, 2009 at 09:52:49AM -0700, sono...@fannullone.us wrote:
 
 
  On Aug 26, 2009, at 9:28 AM, Paul M Foster wrote:
 
  and having a great marriage to a woman I can spend hours talking about
  nothing to.
 
        I'm jealous.  Does she have a sister who's not spoken for?  =;)
 
  She and her sister are about as different as lions and cabbages. ;-}

Are you seriously claiming that marriage, sisters, lions and cabbages
have *nothing* to do with setting and unsetting variables?! ;-}

Paul

-- 
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-26 Thread Stuart
2009/8/26 tedd tedd.sperl...@gmail.com:
 At 2:12 PM +0100 8/26/09, Stuart wrote:

 2009/8/26 tedd tedd.sperl...@gmail.com:

   And, we all need a holiday...

 Apparently a holiday is out of the question, so I've decided to change
 jobs instead. A new environment, that's all I need.

 Loving your view of this list as a hierarchy of idiots btw, I think
 that works as a description for a lot of places.

 -Stuart


 -Stuart:

 I hope your new job still includes this list.

Unfortunately I've already had to cut down a lot on the time I spend
doing stuff like this list in my current job, and that's unlikely to
change when I take up my new role. I dip in when I can, and still try
to have fun with it ;-)

 As for the hierarchy of idiots, but of course -- if we weren't idiots we
 would be doing something that made lot's of money.

 I had a client say to me once If you're so smart, then why aren't you
 rich? I answered quickly What makes you think I'm not? But privately his
 comment cut me to the quick. There was no question that much dumber people
 than me (according to me) were making far more bucks than I was.

 So, who's the smart one? Is it the guy that went to college to get three
 degrees to work his ass off for a moron who pays a a fraction of what he
 makes on the deal? Or is it the moron who sniffs out the deal and gets
 idiots to work for him?

There are some *very* lucky people out there who get away with doing
and/or knowing very little, with minimal intelligence but who manage
to get paid over-the-top amounts for it. In my experience they are the
type of person for whom money is the goal. I hate that attitude and it
says more about society in general than such an individual.

For me money has never been a core driver in my life, mainly because
I've been fortunate to usually have a job that pays well enough to
provide me with everything I need, but so far I've never felt it was
excessive.

IMHO the richest person in the world is the one who would still do
what they get paid for after they've won £100m on the lottery. Having
a job you love so much that you can't imagine not doing it is the holy
grail. I reckon I'm pretty close to that because I love my job (both
current and new) and the only thing I would change if I could would be
to own the company rather than work for it, but that would change
little in my day-to-day activities.

 It appears that the world is made up of morons and idiots -- the problem is
 that idiots do all the work and morons make all the money. The smarter the
 idiot, the more work that's available. The craftier the moron, the more
 money they make and thus the more idiots they hire.

If you ask me you are essentially describing engineers (or doers) as
idiots and salespeople as morons. I won't debate the labels but
unfortunately it's a fact of life that most management types in this
world are ex-sales because they're the ones who know how to use their
skills to further their career which them in a position to favour
sales over engineering when it comes to salary and rewards.

I've worked in a number of organisations where the sales staff were
treated like rock stars and the people who did the actual work were
treated like commodities - easily replaced. I've also worked in (and
now insist on only working for) organisations that recognise that
building stuff is as important, if not more so than being able to sell
it.

When it comes to software, especially since the (and I really hate the
term, but) Web 2.0 label took off it's become increasingly clear that
a good product will sell itself through personal recommendations many
times more successfully than a glossy ad campaign. It's also being
recognised that a fair proportion of the public now object to being
sold something by pretentious, over-confident, pushy salespeople, and
it's fairly likely they'll be put off buying whatever their selling
regardless of what it is. This, I think, is the source of the recent
switch in focus from polished advertising to polished products.

This switch coupled with the low cost of distributing software via the
internet has created the perfect environment for small companies to
create great products and compete effectively with traditional
shrink-wrapped software publishers. And long may it continue. Better
quality software is better for everyone, users and developers alike.

Incidentally, I should say at this point that if PHP has one weakness
in this brave new world its that the barrier to entry is far too low.
It's just too easy to do it wrong and get away with it. Most languages
specifically aimed at web development suffer from the same problem,
but PHP seems to have special skills in this area.

I've been recruiting for my replacement recently (drop me a note if
you're interested in a lead developer role in a financially stable
UK-based company) and as with every time I recruit PHP developers it
scares me the number of people out there commanding decent salaries
when they really don't know what 

Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Stuart
2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
 causes an error
 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in
 C:\wamp\www\TinyCreator\testCrapp6.php on line 42

This is a syntax error, not a runtime error. You've clearly done
something wrong.

 Tom Worster f...@thefsb.org wrote in message
 news:c6b87877.11463%...@thefsb.org...
 is it the case that unset() does not trigger an error or throw an
 exception
 if it's argument was never set?

Absolutely.

-Stuart

-- 
http://stut.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Ralph Deffke
of course its a syntax error, because unset() IS NOT A FUNCTION its a
language construct

ralph

Stuart stut...@gmail.com wrote in message
news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
  causes an error
  Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$''
in
  C:\wamp\www\TinyCreator\testCrapp6.php on line 42

 This is a syntax error, not a runtime error. You've clearly done
 something wrong.

  Tom Worster f...@thefsb.org wrote in message
  news:c6b87877.11463%...@thefsb.org...
  is it the case that unset() does not trigger an error or throw an
  exception
  if it's argument was never set?

 Absolutely.

 -Stuart

 -- 
 http://stut.net/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Tom Worster
On 8/25/09 5:00 AM, Ralph Deffke ralph_def...@yahoo.de wrote:

 of course its a syntax error, because unset() IS NOT A FUNCTION its a
 language construct

that's hard to believe. i can't imagine how the compiler could reliably
predict if the argument will be set or not when the unset line is executed.


 Stuart stut...@gmail.com wrote in message
 news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
 causes an error
 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$''
 in
 C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
 This is a syntax error, not a runtime error. You've clearly done
 something wrong.
 
 Tom Worster f...@thefsb.org wrote in message
 news:c6b87877.11463%...@thefsb.org...
 is it the case that unset() does not trigger an error or throw an
 exception
 if it's argument was never set?
 
 Absolutely.
 
 -Stuart
 
 -- 
 http://stut.net/
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Ralph Deffke
?php

$a = bhsdhjk;

unset();
?

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in
C:\wamp\www\TinyCreator\testCrapp8.php on line 5


the function! doen't exist its a language construct

http://us.php.net/manual/en/function.unset.php


Stuart stut...@gmail.com wrote in message
news:a5f019de0908250344y17c96d5eqc5cedd944e1f7...@mail.gmail.com...
 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
  of course its a syntax error, because unset() IS NOT A FUNCTION its a
  language construct

 FFS, stop talking out of your rear end and post line 42 of
 testCrapp6.php. Or not, your choice.

 -Stuart

 -- 
 http://stut.net/

  Stuart stut...@gmail.com wrote in message
  news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
  2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
   causes an error
   Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`'$''
  in
   C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
  This is a syntax error, not a runtime error. You've clearly done
  something wrong.
 
   Tom Worster f...@thefsb.org wrote in message
   news:c6b87877.11463%...@thefsb.org...
   is it the case that unset() does not trigger an error or throw an
   exception
   if it's argument was never set?
 
  Absolutely.
 
  -Stuart
 
  --
  http://stut.net/
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Aipok
The function is described as void unset  ( mixed $var  [, mixed $var  [,
mixed $...  ]] )

You should use unset($a); in that case.



-Mensaje original-
De: Ralph Deffke [mailto:ralph_def...@yahoo.de] 
Enviado el: martes, 25 de agosto de 2009 13:07
Para: php-general@lists.php.net
Asunto: Re: [PHP] Re: unset() something that doesn't exist

?php

$a = bhsdhjk;

unset();
?

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in
C:\wamp\www\TinyCreator\testCrapp8.php on line 5


the function! doen't exist its a language construct

http://us.php.net/manual/en/function.unset.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Stuart
2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
 ?php

 $a = bhsdhjk;

 unset();
 ?

 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in
 C:\wamp\www\TinyCreator\testCrapp8.php on line 5


 the function! doen't exist its a language construct

 http://us.php.net/manual/en/function.unset.php

Seriously? What part of expecting something confuses you? While it
is true that it's a language construct and not a function that doesn't
mean it's intelligent enough to figure out what you want it to do -
you still have to tell it!!

I mean, come on!!

-Stuart

-- 
http://stut.net/

 Stuart stut...@gmail.com wrote in message
 news:a5f019de0908250344y17c96d5eqc5cedd944e1f7...@mail.gmail.com...
 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
  of course its a syntax error, because unset() IS NOT A FUNCTION its a
  language construct

 FFS, stop talking out of your rear end and post line 42 of
 testCrapp6.php. Or not, your choice.

 -Stuart

 --
 http://stut.net/

  Stuart stut...@gmail.com wrote in message
  news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
  2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
   causes an error
   Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
 `'$''
  in
   C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
  This is a syntax error, not a runtime error. You've clearly done
  something wrong.
 
   Tom Worster f...@thefsb.org wrote in message
   news:c6b87877.11463%...@thefsb.org...
   is it the case that unset() does not trigger an error or throw an
   exception
   if it's argument was never set?
 
  Absolutely.
 
  -Stuart
 
  --
  http://stut.net/
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Stuart
Please don't reply directly unless you intend to pay me for my time.

2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
 sorry but its about the top topic it say it never does an error if u dont
 give an argument

I accept that your English is not great, but given that you should be
a bit more careful.

The OP said is it the case that unset() does not trigger an error or
throw an exception if it's argument was never set?. That does not say
if you don't give an argument. Not even close.

-Stuart

-- 
http://stut.net/

 
 Von: Stuart stut...@gmail.com
 An: Ralph Deffke ralph_def...@yahoo.de
 CC: php-general@lists.php.net
 Gesendet: Dienstag, den 25. August 2009, 14:51:09 Uhr
 Betreff: Re: [PHP] Re: unset() something that doesn't exist

 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
 ?php

 $a = bhsdhjk;

 unset();
 ?

 Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in
 C:\wamp\www\TinyCreator\testCrapp8.php on line 5


 the function! doen't exist its a language construct

 http://us.php.net/manual/en/function.unset.php

 Seriously? What part of expecting something confuses you? While it
 is true that it's a language construct and not a function that doesn't
 mean it's intelligent enough to figure out what you want it to do -
 you still have to tell it!!

 I mean, come on!!

 -Stuart

 --
 http://stut.net/

 Stuart stut...@gmail.com wrote in message
 news:a5f019de0908250344y17c96d5eqc5cedd944e1f7...@mail.gmail.com...
 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
  of course its a syntax error, because unset() IS NOT A FUNCTION its a
  language construct

 FFS, stop talking out of your rear end and post line 42 of
 testCrapp6.php. Or not, your choice.

 -Stuart

 --
 http://stut.net/

  Stuart stut...@gmail.com wrote in message
  news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
  2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
   causes an error
   Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
 `'$''
  in
   C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
  This is a syntax error, not a runtime error. You've clearly done
  something wrong.
 
   Tom Worster f...@thefsb.org wrote in message
   news:c6b87877.11463%...@thefsb.org...
   is it the case that unset() does not trigger an error or throw an
   exception
   if it's argument was never set?
 
  Absolutely.
 
  -Stuart
 
  --
  http://stut.net/
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 __
 Do You Yahoo!?
 Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
 gegen Massenmails.
 http://mail.yahoo.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread tedd

At 2:31 PM +0100 8/25/09, Stuart wrote:

Please don't reply directly unless you intend to pay me for my time.

2009/8/25 Ralph Deffke ralph_def...@yahoo.de:

 sorry but its about the top topic it say it never does an error if u dont
 give an argument


I accept that your English is not great, but given that you should be
a bit more careful.

The OP said is it the case that unset() does not trigger an error or
throw an exception if it's argument was never set?. That does not say
if you don't give an argument. Not even close.

-Stuart


I can't believe that you are wasting time on this. This guy is beyond clueless.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread hack988 hack988
php tigger is right i think.

Because of Zend engine parse line by line.(I can't use English give
expression to it with My Poor English).

It mean that (What I think) unset function is right parse but error
for is parameter.

Tigger Display :Warning: Wrong parameter count for unset  what
is your think.
But Developer want it backend  compatibility  that I guess.
See
http://us.php.net/manual/en/function.unset.php

change logs
4.0.1 Added support for multiple arguments.
4.0.0 unset() became an expression. (In PHP 3, unset() would always return 1).


2009/8/25 tedd tedd.sperl...@gmail.com:
 At 2:31 PM +0100 8/25/09, Stuart wrote:

 Please don't reply directly unless you intend to pay me for my time.

 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:

  sorry but its about the top topic it say it never does an error if u
 dont
  give an argument

 I accept that your English is not great, but given that you should be
 a bit more careful.

 The OP said is it the case that unset() does not trigger an error or
 throw an exception if it's argument was never set?. That does not say
 if you don't give an argument. Not even close.

 -Stuart

 I can't believe that you are wasting time on this. This guy is beyond
 clueless.

 Cheers,

 tedd

 --
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Stuart
2009/8/25 tedd tedd.sperl...@gmail.com:
 At 2:31 PM +0100 8/25/09, Stuart wrote:

 Please don't reply directly unless you intend to pay me for my time.

 2009/8/25 Ralph Deffke ralph_def...@yahoo.de:

  sorry but its about the top topic it say it never does an error if u
 dont
  give an argument

 I accept that your English is not great, but given that you should be
 a bit more careful.

 The OP said is it the case that unset() does not trigger an error or
 throw an exception if it's argument was never set?. That does not say
 if you don't give an argument. Not even close.

 -Stuart

 I can't believe that you are wasting time on this. This guy is beyond
 clueless.

To be fair tedd English is clearly not his main language and I can see
how you could misunderstand the original question as he did. What I
objected to was that he took what he interpreted as the question being
asked, saw that it did in fact behave that way and then proceeded to
completely fabricate an explanation as to why it does so when that
explanation does little more than demonstrate that he clearly has no
understanding of what's actually going on. I can't stand people who
claim to know what they're talking about when they're really making it
up as they go along.

Actually, an explanation like that does do a lot more than demonstrate
ignorance. It gives naive observers of this thread, now and in the
future, incorrect information that they may potentially rely upon if
nobody corrects it. That's why I'm wasting my time on this - I do it
for the greater good.

Hmm, maybe I just need a holiday...

-Stuart

-- 
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: unset() something that doesn't exist

2009-08-25 Thread Ralph Deffke
sorry I mixed 'set' with 'given' and if my mistake did prevent all the
smarter guys to give u an answer I'm sorry too.

I hope not to be too limited to give u an answer

well, think about how PHP 5 works.
$a e.g. is a REFENCE to some memory where the variable resides.

so the interpreter running into this unset() statement searches the
reference table to find the pointer named $a to delete its name from the
reference table. it doesn't find it, but it's ment to unset it anyway, why
should be complained about it. in the next line the $a is not set, as u want
it.

mmmh nice as well that nobody told me direcly that I mixed set with given

ralph_def...@yahoo.de

ps.: great behavior, I think for less then 10% of the world population is
english the native language, such a behavior prevents very good and smart
programmers arround the world to share their knowledge.

Tom Worster f...@thefsb.org wrote in message
news:c6b93df9.114fa%...@thefsb.org...
 On 8/25/09 5:00 AM, Ralph Deffke ralph_def...@yahoo.de wrote:

  of course its a syntax error, because unset() IS NOT A FUNCTION its a
  language construct

 that's hard to believe. i can't imagine how the compiler could reliably
 predict if the argument will be set or not when the unset line is
executed.


  Stuart stut...@gmail.com wrote in message
  news:a5f019de0908250201g14e4b61cn73c6cd67da6f...@mail.gmail.com...
  2009/8/25 Ralph Deffke ralph_def...@yahoo.de:
  causes an error
  Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`'$''
  in
  C:\wamp\www\TinyCreator\testCrapp6.php on line 42
 
  This is a syntax error, not a runtime error. You've clearly done
  something wrong.
 
  Tom Worster f...@thefsb.org wrote in message
  news:c6b87877.11463%...@thefsb.org...
  is it the case that unset() does not trigger an error or throw an
  exception
  if it's argument was never set?
 
  Absolutely.
 
  -Stuart
 
  -- 
  http://stut.net/
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php