« first day (668 days earlier)      last day (4506 days later) » 

08:18
Okay my date just canceled.
posted on August 14, 2012 by Dr. Christopher Kunz - PHP

After updating PHP to version 5.4 (with mixed success), I am still cleaning up the fallout peu à peu. During my holidays, the fact that my Roundcube installation is also broken bit me (I needed quick access to my flight information and the e-mail was not cached on my iPhone). Today, I tried to fix it.  I was using Roundcube 0.8-beta with the SQLite backend, and it seemed the database wa

Sem
Sem
Good morning
roundcube still lives ?
and morning eveyone
morning both
i am trying to nest two mysqli prepared statements . is the order like this?
$stmt=prepare(SELECT query)->bindparam->bindresult->execute->fetch-->stmt2=prepare(another SELECT query)->bindparam->bindresult->execute-->fetch-->close(stmt1)-->close(stmt2)
08:33
mornin'
well i still didnt have a good night
Morning @Sem, @tereško, @Leigh and good night @blackbee and you should be in bed then.
@blackbee are you making that shit up as you go ?
I don't think it was actually supposed to be method chaining, just bad use of "->"
now the problem is i have to select a user post show it, and then fetch the comments for each user post and then print them too, but the second prepare statement doesnot work, inside the first one.
to be specific:
the flow goes like this

$stmt=prepare(SELECT query)->bindparam->bindresult->execute->fetch-->while(fetch){echo 'something'->stmt2=prepare(another SELECT query)->bindparam->bindresult->execute-->fetch-->wile(fetch){echo 'anotherthing';}}->close(stmt1)-->close(stmt2)
08:41
that is not valid php code
this is a demostration of the order of the code, whell then i'll paste the part of the code in pastebin... hold on
morning @Leigh
@Leigh you've see this comment?:
I prefer this option to @Grampa's answer. They're similar, but as you say, this one avoids any kind of global, even on hiding in a class as a static. This is good. I don't know what you mean by your comment about royalty fees, though??? — SDC 48 mins ago
morning @NikiC
morning @hakra
08:45
morning
Morning @webarto
pastebin.com/sx6C2Wsk here is the code
the second prepare statement doesnot work...... i cudnot figure why
spaghetti , spaghetti everywhere
whats spaghetti?
please ignore the lines that are commented out, like //
morning
@blackbee Spaghetti is a long, thin, cylindrical pasta of Italian origin. Spaghetti is made of semolina or flour and water.
The big ball of mud anti-pattern.
what am i talking!!
08:58
@hakra calling The Big Ball of Mud an "anti-pattern" is an insult to other, legitimate anti-patterns
Spaghetti and a glass of red wine, its italiano
so what does my pastebin thing has to do with spaghetti
come on someone help meeee....
now, i feel like crying to the world...
I don't think that you'll get help here
You need to change your basic approach to learning
http://stackoverflow.com/questions/11948875/pass-php-variable-to-jquery#11948941
errr,,,
@NikiC: Feeling any better today?
09:02
@tereško I thought you have had that in your lectures.
@Leigh A bit
Didin't you suggest me the book even?
@hakra !!!
its just a simple piece for you people.....
piece of code
after this i have to make the search and add friends and message to friend..... i thought i wud complete within this week.....
Sometimes I get the urge to write games, then I get depressed by the fact the only people who would play them would be me...
09:11
:D
the error is:
mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given
UTFS
(use the fine funking funky search)
good thing there is ignore
funking search :D
i think because the prepare statements doesnot work, it passes a boolean value to the bind_param
i already read about it
funk dat
Then you have also read about php.net/mysqli_error ?
09:22
no errors are showing up and that the problem...
@decereé if u like to have a link,(but ingnore the commented lines for example //stmt->store_results()
http://pastebin.com/sx6C2Wsk
@webarto if u dont want to help, dont help, none of people in here is helping, call me an idiot
$stmt = mysqli_prepare($db, ...);
if (!$stmt) {
    die(mysqli_error($db));
}
^ try that
@blackbee you are abusing these helping people
i am abusing?? pls... i think i dont like to dream in the day, not in the night to!! i am sorry if that hurt.....
09:28
wat
well it doesnot show an error
Remember, this is "PHP discussion", not "PHP help" or "PHP support". People will help if they want to. We see lots of stupid questions all day, if you want someone to help, try and make your question interesting, well thought out, and showing that you have done prior research.
@decereé
@Leigh i am not making a movie script, its a php script
you are getting FREE help, and you are asking question like you have paid $$$ for the course, sad thing is that all of your questions are precisely answered many times before (over 9000)...
tbh, PHP: The Movie would be more interesting than your problems :)
09:30
Just ignore the vampire
@tereško 805. Is that good?
Who would we cast as Rasmus?
Rasmus (himself) :D
I have a feeling he doesn't act
@Leigh PHP: The Movie would probably be a French art style movie with a plot too messed up to comprehend.
09:31
@decereé more then me , less then hakra
ah god!!
Note For Entertainment Industry Only: I am ready for working 100% free of cost for short films, ad films, corporate films and full featured films.
why did i say movie and php??
@blackbee Seriously. You should know we're too easily distracted!
@decereé Distracted by what?
09:34
Case in point: /me being in this chat room to begin with.
we are distraction junkies
I was thinking instead of PHP: The Movie, we could start on PHP: The Game, but then I remembered all those horrible codepads out there...
i think everyone is :)
PLB
PLB
I need to merge stdClass object with object of some custom class inside its method. Of course, I can't directly assign anything to $this. So my solution is something like:

class A {
private $properties;

function __get($name){
return $this->properties->{$name};
}

public function myMethod(){
$obj = someFunctionThatReturnsStdClass();

$this->properties = (object)array_merge((array)$this->properties, (array)$obj);
}
}

Is there more efficient way?
PHP: The Movie a The Social Network style origins story. Except... a lot less drama.
09:40
@PLB $this->properties += (array)$obj ?
oh it has to end up as an object, hm
PHP: The Movie - The camera is pointed at a sandbox in a children's playground. Over the course of the next 168 minutes more and more children flock to the sandbox and start building a giant, formless sandcastle. Fin
^ would not watch
@decereé The rate of flocking could be linked to the SVN commit frequency.
PLB
PLB
@Leigh Hmm, you are right. If $properties will be array, I can simply so this. and in getter I'll treat it like an array. Thank you. By the way, is this design ok?
Also towards the end, some decisively foreign children should try and build their own sandcastle next to it, then the original children should go and stamp on it... coz we don't need no stinking unicode.
@Leigh Now that would save the whole script!
09:46
@PLB It's probably a horrible design. Make your function return an array.
Also, the script to the movie is obviously scripted... in PHP...
Obviously
PHP: The Movie - The prequel to The Social Network - "They couldn't have built it without PHP."
then there could be a third movie called HipHop: a facebook love story
@Corbin The main character needs to be a dog
09:50
lol
PLB
PLB
@Leigh Thanks.
One with a little trolly for his back legs, because he was hit by a car, and he's searching for his long lost childhood friend.
hahahaha
But he's still running circles around all the other dogs.
HipHop: A facebook and Disney production
09:52
Sure, he has a heterochromatic cat as a companion.
.... named Milo?
:)
Well the dog would have to be named Zucks
wtf... Milo and Otis was a remake of a Japanese movie? never knew that.
The plot consists mostly of Milo and Zucks running around back alleys, peaking into windows.
and apparently 20 kittens were killed in the making? omg... childhood ruined.
well, allegedly*
09:56
@Corbin yes, allegedly all of those whales are killed in the name of science..
lol
Why is that funny?
"in the name of science" is just a funny reason
the wikipedia article on modern japanese whaling doesn't play around: upload.wikimedia.org/wikipedia/commons/7/79/…
The Japanese are prohibited from hunting whales, but there is a clause in the agreement that allows it for scientific research. They abuse that "loophole"
i must admit that while i knew that whaling had become a problem in japan, i did not know that they're using a science loophole
10:00
For sushi I mean science!
just thought their gov didnt care
which now that i think about it, i should've realized.... lol.
that's a lot of international pressure to resist if they weren't using some kind of excuse other than "oh we just like to kill whales."
Cultures change slowly. Especially Japanese culture.
yeah
creeps on deceree's profile -- thought you were in Japan :)
I should change that. Moved to Europe recently. Will be going back occasionally though.
There, FTFM.
lol
oh god...
@decereé Be sure to let us know when you go back to Japan, I'll be there again too at some point.
i miss the days of people actually making an effort of more than 2 minutes to learn the basics of a language before mashing buttons and making code.
@Leigh Sure. Lets meet up halfway around the world.
Sem
Sem
10:08
@decereé , What's with you, @Petra and @hakra changing their names slightly?
@Sem Did you miss Gender Friday?
Sem
Sem
@decereé Guess I did :)
that makes so many weird jokes about seeing people's boobs make sense now...
@Sem Now we're stuck with the names for 30 days... ^_^;;
Sem
Sem
So.... you guys are having a sexchange for a month? Oh goody.
10:12
@decereé I'm in Germany next week ;) (Karlsruhe)
for >= a month. they might like their new genders :)
Good day - UGT , everyone
@Sem I could only do mine for a day.
good afternoon/evening/night @tomexsans
Do you guys also get an errror on php rfc? wiki.php.net/rfc/finally
10:13
yeah, @Petra
@Leigh I'll be in Munich beginning of next week. Still a bit out of the way. :D
Sem
Sem
@Leigh Sad for you pal. No boobs to stare at in the mirror.
oh actually, it just loaded, @Petra. was giving me an error about 20 minutes ago though.
@Petra wiki.php.net:443 looks like they forgot to enable SSL on the port.
if you go to wiki.php.net:443 it's going to try http on an https port
so i wouldnt expect that to work
10:15
Exactly
and trying to go to https gives an SSL error
the starred linked doesnt give me an SSL error any more, oddly enough
it did a while back though
Same as @Corbin. It's working now. Finally.
Does here - still not working
And now working again
@decereé I'll be down by Konstanz at some point, not sure when, then heading to Prague from there.
So I'll pass you, but wont stop to say hi sorry :P
@Leigh It may be easier to meet in Tokyo. Europe's too big. ;P
10:31
Recently I often click on the cv-pls link and then think "I don't even want to read this..." and close the tab again :/
I'm too lazy for closevoting
@NikiC I generally hover over the link and check out the title :p
Also I think that we're fighting a losing battle
Closing just doesn't make sense anymore
Of course we are, while there is no home for style questions, SO will continue to degenerate.
The problem has become so large that the current close-vote system can't keep up with it
6
10:33
I maybe see 1-2 questions a day that I want to answer :(
2 years ago, I wanted to answer half of the page
@Leigh I don't. Because I don't want to look for them.
@NikiC I generally start and end my day scanning the bounty questions.
But in all honesty I can't think what SO should do about it off the top of my head
@Leigh , you just need to pick a topic and follow that tag
@NikiC Indian language version site
10:35
@Leigh I check them out every now and then too. But I don't like most of the stuff I see there either
@tereško Yea, I picked , rarely any questions that are interesting any more.
As long as there are noobs and people that really don't care about what they're doing, there'll be terrible questions. Lots of them. Which means, there's no solution. :(
@tereško I have most of the framework tags as ignored tags :) - as well as ignoring wordpress + facebook tags
I think we just have to fork SO. The good people will follow. The unwashed masses will catch up to it in two or three years. Rinse, repeat.
10:39
Maybe one could add a 10-rep requirement for asking questions
@NikiC That encourages shitty answer spam.
@Leigh not sure
Well I guess those kind of answers wont get upvotes, but they will just collude to upvote each other to get asking rights.
I could imagine that IAP-patients wouldn't bother to get those 10 rep. They'd just not try to ask something here to begin with
Being able to filter questions based on more criteria would be nice. Asker > X rep. First questions where asker has a name not matching /user\d+/
Perhaps we could do something with the SO API
10:43
stackoverflow-without-the-overflow.com? Sounds like a neat idea.
i wish people were forced to pick a proper name
might be a good step towards putting at least the tiniest bit of effort into a question
"omg i have to think of a name? maybe i should just read the manual!"
Well, come up with a list of criteria that make a question interesting, and we can come up with a way of filtering them.
i don't know if there would be an algorithmic way of determining question interesting-ness
It could simply add more choices of filters that everyone could customize. Like a kayak.com for SO questions.
i think that would end badly. as annoying as the "omg i can't read the manual. can you do it for me?" questions are, i'm sure a filter would somehow backfire.
hrmm that could be interesting, @decereé
though the most useful filter would probably be > X rep, and that would be detrimental overall.
10:48
I think I'd still check 1 rep users first questions where they had a name set and their profile didn't contain the word India
yeah....
If the body of the question contained at least one code block and was more than n chars long
It could use a spell/grammar checker too to add/subtract points.
as horrible as this is going to sound, a filter for "only show the question if the user has more than 100 rep, or the profile doesn't contain India" would be amazing.
I think I found a project for while I travel ;)
10:52
is there some sort of rule that the first answer always gets a +1 ?
@tereško yes. yes there is
Decent question for a 1-rep-user\d+ user:
0
Q: PHP namespace and dynamic classname

user1482915I've encountered a "weird" thing while experimenting with spl_autoload, namespaces and dynamic class names. I use PHP 5.3.2, call the autoload like this set_include_path(get_include_path().PATH_SEPARATOR."classes".PATH_SEPARATOR."utils"); spl_autoload_extensions(".class.php"); spl_autoload_regis...

Sem
Sem
Why oh why do so many developers stick with 1 framework with de usual excuse "why reinvent the wheel? durr" and see themselves as elites.
because learning is hard , and learning that you were doing something wrong is even harder
Sem
Sem
@tereško Perfect answer alright :)
I just got the domain filteredoverflow.com. If someone wants it to make a question filter, let me know. Let's see if I get around to using it... :-3
posted on August 14, 2012 by Lorna Mitchell

A very quick snippet today because I've told two people to use this approach in the last few days and both of them told me they didn't know about it. How to check if an email address is valid in PHP: use one of the Filter functions, like this:   $email1 = "nonsense.something@dottiness"; // not a valid email $email2 = "dotty@something.whatever"; // valid email   $clean_email1 = filter_var($

@Feeds Right, definitely avoiding her talk at PHPNW
11:17
lol
i think we need to remove Planet PHP from feed stream , i suspect that replacing it with /r/PHP would increase the quality of Feed at this point
@tereško Or remove it completely with no replacement for an even higher quality increase.
true
@Leigh We can just add @ircmaxell's feed ^^
Do not forget, next weekend it's PHPUnconf in Hamburg and the one up next is Froscon in St. Augustin near Cologne / Bonn with big PHP and programme and many other interesting topics.
So you can have a real summer of php this month over here in germany ;)
@NikiC Then all of the content here could be completely biased.
@hakra , oh , it's the on which cannot make a website in which you can actually find stuff
@Leigh We like it biased, right?
Well .. i failed to find a list of talks in PHPUnconf's page , but they had a guestbook ( which broke the page layout )
@tereško which one of the two ? ;)
11:25
@tereško It is an unconf. The day the conference happens (early in the morning), we set the schedule. So you do not know what will be offered until you take part and do your own offerings as well. Known as well as open space.
all together, early, on.
we call it "Barcamp" .. it's the same , but with beer
In germany, beer is implied :D
in that case , with better music
@Leigh Yeah, especially when it's hamburg. Not much good wine there.
contribs.eu.phpunconf.org they have some contribution system so folks who come can do some suggestions earlier. I actually think that is cheating. But well, techies need websites.
But as far as Froscon is concerened, it has a huge schedule:
programm.froscon.de/2012/schedule/2012-08-25.html (and that is only the first day)
"MySQL normalisieren ist deprecated"
11:30
@tereško They made it especially for you ;)
it's not even in german =/
Okay, so now I'll try my new swimsuit and gear. Bought much stuff lately that needs to go with me into the water now.
Catch you later and do not sit too much in front of the computer ^^
It's not good for the face's complexion.
Good morning
11:51
MySQL möglichst n-fach normalisieren wird einem in der Schule beigebracht, warum das Oldschool ist und bei größeren Datenmengen (und auch Traffic) nicht funktioniert, möchte ich in dieser Session erläutern.

Keywords:

* Sphinx
* join-freie Tabellen-Architektur
* igbinary
* Daten als blob
* performante "varchar" Indexe (z.B. für "seo-urls")
* percona.com server
^ I have no idea if I could ever talk about programming in German. That's mostly English with German filler words...
well now it shows me
Commands out of sync; you can't run this command now;
i don't want someone to edit my code, just tell me how to call one prepared statement within another; or why it cannot fetch values from another table with one prepared statement is running a query......
@decereé , that was my first impression too
i have this theory that german will be one of the first languages that gets absorbed by english
morning @ircmaxell
@tereško It's already perfectly on course.
In your tests, do you normally have use statements at the top to import namespaced classes, or do you specify the fully qualified class names in the tests themselves?
I guess there's technically no real issue with doing it either way
11:59
i prefer use statements , they make for cleaner code
My rule of thumb: If the class is used more than once, import it ;)
1
Q: How to override trait function and call it from the overriden function?

ShuScenario: trait A { function calc($v) { return $v+1; } } class MyClass { use A; function calc($v) { $v++; return A::calc($v); } } print (new MyClass())->calc(2); // should print 4 This code doesn't work, and I cannot find a way to call a trait ...

Try removing the leading backslash in the strings. Dynamic class names are always fully qualified, so adding the backslash there is discouraged. — NikiC 1 hour ago
@NikiC ^ should be an answer
12:19
I am the source of all evil
Right. That should still be an answer.
@decereé , some of use think that "answer" is something that contains at least a paragraph
@tereško You can pad that out... :3
@decereé Didn't feel like answering ;)
"oh, and apparently you are the reason why I got code reviews from an intern my array is too big and I should use a fixed array object ;))"
And before that: "nikic: why you a docblocks hater? :)) you gave my yound padawans here deadly weapons :("
From which was concluded that I am the source of all evil :)
i'm with the school of thought to give the young padawans enough rope to hang themselves and everyone else in the the village
12:25
@NikiC You mean the "src" of all evil surely? :)
@Petra why the name change?
3 hours ago, by decereé
@Sem Did you miss Gender Friday?
@Neal It's not just a name change, there was surgery involved.
13:01
well , most of surgeries have less recovery time then SO's time limit for changing the nick back
heeh right about that :P
@Petra Btw, you can probably sign up to a new SE site, link the profile, then copy across all
13:17
Joomla, Magento and Wordpress... best things that happened to PHP...
depends on the context
Indeed, they have promoted PHP...
holy shit ! Did anyone actually read that promotional .. emm .. description ?!?
@Leigh ehhh
@Petra wazzat?
13:28
Guys, are there any awesome Node.js tutorial out there on web?
@user1065129 , sure , but they would require ability to both read and comprehend
since you are asking this in php chat room you do not posses both
cmon man
am just asking
@tereško LOL
@tereško Made with the random gibberish generator for PHP, obviously.
it doesn't mean you can't eat KFC in McDonald and you already have bought some food from McDonald
you still can eat KFC in McDonald
as long as you have bought food from McDonald
13:31
=_=;;; Can't squint hard enough to make sense of that analogy...
don't touch my KFC
It means that I am intereted in PHP also Node.js
:hungynow:
I hate McDonalds (Node.js) :D
@Leigh smart :)
You saying PHP == KFC? I thought PHP was a meal made of leftovers...!?
13:33
Well yeah, I like my server to be written in C (if i knew writing C) but Node.js gives you ability to write cool online apps so easily
@user1065129 as does html... js... php.... lemonade....
yeah
but even easier than those you have mentioned
Node.js is a rockstar technology because it mainly uses non-blocking IO
@decereé lol
"cool online apps", now there is a problem... rockstar :'(
13:37
@PeeHaa Worked?
Aaha, clearly. :) Btw, who was the girl?
@Petra
so , did you guys managed to wear out that analogy , or should i assist ?
@decereé dunno, funk it :)
come on guys, i'm trying be friendly
@tereško please do :P
13:42
we all have a common interest -> php
I thought this was Node.js room
@user1065129 go to javascript room and make friends
come on bro, im not a frontend guy
i'm a backend mate
<-- changes job title to Backend Mate
congrats , @Lusitanian , you ruined it
at least im not a .net dude
13:46
.. good thing i am eating now
0
Q: How to report a moderator

amanaP lanaC A nalP A naM AHow do we report a moderator? Is there any way to file a complaint against a moderator aside from clicking on the contact us link and sending an email to the top brass?

Cutting edge technology.
Now I want a mac.
that's some gangsta shit
13:49
@Leigh :D
@user1065129 please , stop trying to sound cool, you are hurting us
Yes I am emotionally shaken by your words. I will now go cry in a fetal position for hours on end.
@Neal Aaaaaaaaand it's gone.
Well, all i've said was something like "KFC, McDonald" and shit. does "KFC" scares ur balls off?
bro?
@decereé whatever... screw it... I am done with meta.
13:52
@Petra are you a .net man
@Neal what happened thur
@Lusitanian ?
at meta...?
@Lusitanian what happened thursday?
i meant there, oops
i'm glad i can type
@Lusitanian What do you mean?
13:55
Is anyone here from Australia?
yes, i am
@Petra nevermind
hey dude I live in Sydney, you?
2
Q: Really weird bug with a for loop PHP

Jonathan PellerinSo this bug seems really weird to me. I have a method with two required arguments, but when the script gets inside the first for loop, one of the two arguments seems to no longer exist. Here's a chunk of the code: public function getOptionsForParameters($params, $product){ // here the value...

@tereško wazzat?
13:57
@decereé SQL query inside loop... ?
@Neal draw in the Sketch thing
what's that tere
@webarto Yeah, uhm... also no debugging skills.
@tereško whoa..... lava-lampy
what does it do? @tereško
13:59
if it quaks like a duck

« first day (668 days earlier)      last day (4506 days later) »