sangoku Posted April 14, 2010 Share Posted April 14, 2010 Hy i was making some class.... and i had a structure where i did the folowing class a { public $t; function buga(){ $this->t = 'buga'; } function bla(){ $b &=$this->t; echo $b; } } $a= new a; $a->buga(); $a->bla(); //this outputs Notice: Undefined variable: b in C:\...\test.php on line 20 Either I am nuts or is this a bug.... Will ask on php bug report... i posted it here http://bugs.php.net/bug.php?id=51555 can someone reproduce the error and tell me the OP and the version to.. so i can confirm it... Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/ Share on other sites More sharing options...
Deoctor Posted April 14, 2010 Share Posted April 14, 2010 Hy i was making some class.... and i had a structure where i did the folowing class a { public $t; function buga(){ $this->t = 'buga'; } function bla(){ $b &=$this->t; echo $b; } } $a= new a; $a->buga(); $a->bla(); //this outputs Notice: Undefined variable: b in C:\...\test.php on line 20 Either I am nuts or is this a bug.... Will ask on php bug report... i posted it here http://bugs.php.net/bug.php?id=51555 can someone reproduce the error and tell me the OP and the version to.. so i can confirm it... define the $b as var $b in the start of the class Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041635 Share on other sites More sharing options...
Ken2k7 Posted April 14, 2010 Share Posted April 14, 2010 Why would it be a bug? It's just you. What did you intend to do with &=? Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041636 Share on other sites More sharing options...
Deoctor Posted April 14, 2010 Share Posted April 14, 2010 oops yes i didnt checked that run this one <?php class a { public $t; function buga(){ $this->t = 'buga'; } function bla(){ $b =$this->t; echo $b; } } $a= new a; $a->buga(); $a->bla(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041643 Share on other sites More sharing options...
salathe Posted April 14, 2010 Share Posted April 14, 2010 Not a bug, just a confused developer. I believe, like Rasmus said in your bug report, that you wanted to do an assignment by reference but what you were actually doing is a 'bitwise and' assignment. Your code tries to do: $b = $b & $this->t and because $b has not been defined before trying to be used (to the right of the =) that is the cause of the error. As stated, you probably wanted to use $b = &$this->t instead. Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041644 Share on other sites More sharing options...
sangoku Posted April 14, 2010 Author Share Posted April 14, 2010 :'( Lol yup confused C or C++ and PhP... how to remove the false report...? Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041646 Share on other sites More sharing options...
Daniel0 Posted April 14, 2010 Share Posted April 14, 2010 You can't, but it was closed as "Bogus". Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041651 Share on other sites More sharing options...
Mchl Posted April 14, 2010 Share Posted April 14, 2010 At least you had a privilege to be answered by Rasmus Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041683 Share on other sites More sharing options...
Maq Posted April 14, 2010 Share Posted April 14, 2010 To answer your question, you are nuts. Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041695 Share on other sites More sharing options...
salathe Posted April 14, 2010 Share Posted April 14, 2010 Lol yup confused C or C++ and PhP... how to remove the false report...? As was mentioned, the report is flagged as "bogus" which means it's not a bug at all. It will remain in the system so that anyone else wishing to submit a similar report in the future might stumble upon yours and notice their error. Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041721 Share on other sites More sharing options...
sangoku Posted April 14, 2010 Author Share Posted April 14, 2010 Shame on me Q.Q.... :'( By the way thanks for the compliment i am taking that as a compliment when someone calls me buts XD At least you had a privilege to be answered by Rasmus i don`t see any rasmus in this thread? edit again... a mean the one who told me i had an memory corruption in my CPU.... Who is he? Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041916 Share on other sites More sharing options...
Maq Posted April 14, 2010 Share Posted April 14, 2010 You mean nuts? And you're welcome Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041918 Share on other sites More sharing options...
Psycho Posted April 14, 2010 Share Posted April 14, 2010 At least you had a privilege to be answered by Rasmus i don`t see any rasmus in this thread? I think it was stated he responded in your bug report. http://en.wikipedia.org/wiki/Rasmus_Lerdorf Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041922 Share on other sites More sharing options...
sangoku Posted April 14, 2010 Author Share Posted April 14, 2010 know know, but why? is he famous? i see he has a big php message count.... and? is he fames programmer... a php developer??? And Maq if someone tells you are nuts, why duos he say it... think about it and then you will see it is actually a compliment if you understands from whom it comes. Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041954 Share on other sites More sharing options...
Mchl Posted April 14, 2010 Share Posted April 14, 2010 are you nuts? Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041956 Share on other sites More sharing options...
Alex Posted April 14, 2010 Share Posted April 14, 2010 know know, but why is he famous? i see he has a big php message count.... and? is he fames programmer... a php developer??? As you can see from the link provided he's the creator of PHP. Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041959 Share on other sites More sharing options...
seventheyejosh Posted April 14, 2010 Share Posted April 14, 2010 This thread is full of fail... Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041960 Share on other sites More sharing options...
sangoku Posted April 14, 2010 Author Share Posted April 14, 2010 ok contra question. What is the referential definition of nuts...? Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041963 Share on other sites More sharing options...
Mchl Posted April 14, 2010 Share Posted April 14, 2010 http://en.wikipedia.org/wiki/Nut Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041968 Share on other sites More sharing options...
seventheyejosh Posted April 14, 2010 Share Posted April 14, 2010 http://en.wikipedia.org/wiki/Nut He said nutS not nut http://en.wikipedia.org/wiki/Nuts_(magazine) First result so it's prolly about right... Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041984 Share on other sites More sharing options...
sangoku Posted April 14, 2010 Author Share Posted April 14, 2010 know know, but why is he famous? i see he has a big php message count.... and? is he fames programmer... a php developer??? As you can see from the link provided he's the creator of PHP. [size=18pt]W[/size]oW I am really honored. Really.... really really.... And one side note mean the philosophical not medical definition of nuts. And yes this is becoming a spam thread... but it is fun ... am i riiiiiiiiight Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1041997 Share on other sites More sharing options...
Ken2k7 Posted April 14, 2010 Share Posted April 14, 2010 ok contra question. What is the referential definition of nuts...? What is the definition of a referential definition? Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1042006 Share on other sites More sharing options...
newbtophp Posted April 14, 2010 Share Posted April 14, 2010 ok contra question. What is the referential definition of nuts...? What is the definition of a referential definition? http://www.thefreedictionary.com/referential Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1042011 Share on other sites More sharing options...
Psycho Posted April 14, 2010 Share Posted April 14, 2010 know know, but why? is he famous? Jeez, I provided a link. Do I need to come to your house to click it for you? I guess you would rather have me give you a fish instead of teaching you how to fish. Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1042016 Share on other sites More sharing options...
Ken2k7 Posted April 14, 2010 Share Posted April 14, 2010 ok contra question. What is the referential definition of nuts...? What is the definition of a referential definition? http://www.thefreedictionary.com/referential Yeah, thanks for defining 50% of it. >_> mjdamato: of course! Fishing is boring. LOL Quote Link to comment https://forums.phpfreaks.com/topic/198511-php-bug-or-i-am-nuts/#findComment-1042017 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.