« first day (2077 days earlier)      last day (2870 days later) » 

user5137948
12:19 AM
What's the meaning of || in MySQL? Is that mean OR or Combination? stackoverflow.com/questions/37961602/…
 
12:44 AM
@bwoebi you around?
 
 
2 hours later…
2:35 AM
Morning
 
hey
 
3:22 AM
good morning
 
3:42 AM
Hey Guys, Good Morning to all of you, I have a question regarding pdo in code igniter. Any one here that has gone through the process of pdo in ci.?
 
 
1 hour later…
4:59 AM
@sanjeet-singh did it worked ?
 
5:20 AM
Moin
 
5:32 AM
@samayo Not sure what you mean. loadHTML will not render the page at all. It just parses it into a DOM tree. To render it, you need to do echo $dom->saveHtml(). That will obvsiously render the page when you view it in a browser. The solution is to send a text/plain or application/xml header then.
 
6:16 AM
@Wes merged you PR. As to windows, I have no win machine to try, but will try to add appvyor integration to test against windows.
does that fix from solves problem?
 
user3119231
6:51 AM
good morning. I have a searchbar which searches in all database columns. To achieve a result which is LIMITable, I do a php loop and check if any column is LIKE the result.
 
user3119231
Is there a better way?
 
user3119231
Instead of looping and building the mysql query?
 
@Maurice do you do one query per like or do you build one query with the likes combined with an OR?
 
user3119231
@Gordon the second argument
 
user3119231
$query = "SELECT * FROM tickets WHERE ";
for ($i = 0; $i < count($result); $i++){
	if ($i == count($result) - 1) $query .= $result[$i]."='%".$key."%'";
	else $query .= $result[$i]." LIKE '%".$key."%' OR ";
}
$query .= " ORDER BY Date DESC LIMIT 0, 1";
echo($query."<br><br>");
 
7:02 AM
I assume you have sanitized the input before building it without prepared statements?
 
user3119231
seems like I forgot that.
 
user3119231
$query = $db->prepare($query);
$query->execute();
 
I was more aiming at the string interpolation
what if $key is "foo%; DELETE from tickets where 1=1; --"
 
user3119231
sql injection?
 
yes
 
user3119231
7:07 AM
So what would be your way to achieve a query for a search over all columns with use of the prepare statement - got it, I think.
 
Wes
@pinepain my pr? sadly not, there are these 5 unresolved symbols
 
!!dad
 
Wanna hear a joke about paper? Nevermind, it's tearable
 
Wes
\o hodors
 
@Jeeves Not as bad as jokes about german sausages though. They are the wurst.
 
7:09 AM
:P
 
user3119231
@Gordon Actually I was pointing on the loop. Is there a way to do it without creating a loop? (Performance)
 
@Maurice no, you got the columns in your result array. Reducing them to a string will require iteration over that array somehow. Whether you do that in an explicit for/foreach or an implicit array_map/implode doesnt matter. it will take a loop.
 
user3119231
thank you. Now I can sleep in peace
 
@Wes I will try to figure what's wrong with it later
 
Wes
7:27 AM
@pinepain ok, if you want to test it i can do it in seconds :P
 
Morning.
 
nicely, btw, there another weakref implementation (literally weakref - github.com/colder/php-weakref)
 
Wes
yep that's the one i'm currently using but it doesn't compile on php7
 
they should have php7 support
i initially wrote mine weak ref impl because they was lack of it, but right in a few hours i released my imp they added php7 support
yeah, they support php7 from v0.3.0
 
Anonymous
moooooorrrrrniiiiiiinnnnnn
 
Anonymous
7:39 AM
!!wotd
 
rib-tickling: very amusing; funny or hilarious.
 
Anonymous
@JayIsTooCommon if you want to join you can. There is no task for each person, you contribute whenever you feel like it
 
Wes
@pinepain lol, indeed :P but i bet it's not gonna work on windows too, checking
 
Anonymous
@samayo Sure, I'll follow the repo and get involved when I can :)
 
Anonymous
Yeah, that would be nice.
 
Gon
7:51 AM
what are you building @samayo?
at last, my avatar changed \o/
 
migrating mother to pettable phone
 
Anonymous
@Gon It's a collective project, just for a couple of devs trying to build something and learn at the same time.
 
Anonymous
And who are you?
 
she was using Nokia C1-01 all this time
 
Gon
@samayo @Saitama
@tereško really?
 
Anonymous
7:54 AM
@Gon Have you sent watkins a link to your blog post :P?
 
Gon
shhh....
 
o/
 
Anonymous
:D He'll like it!
 
Anonymous
@Fabor o/
 
Anonymous
Eh, it's samayo vs npm, day #3 now ..
 
7:58 AM
No MCVE Dropdown using Ajax and PHP - Royce - 2016-06-23 07:53:20Z
 
Wes
@pinepain surprisingly it compiles \o/ still if you want me to test your ext let me know it, i'm also curious to try it
 
For some reason I find bash scripting harder to figure out than php...
 
Anonymous
@Epodax which part?
 
Everything tbh, php is just much more simple to me, In bash I have to do different things in order to capture the error output for different sets of commands, and if I do that, then I also have to change my if clauses and because now the output is being captured :p
I might just be a dimwit, but at least I find php is rather straight forward.
 
mooornings
and happy prebecca day..yo
=)
 
8:09 AM
o/ Morning @RonniSkansing
May the prebecca be with you.
 
ako
hi there
it is a bad idea to include a php file inside a function???
 
Morning!
 
@Wes can you try mine one once again?
 
@ako Not by itself. Depends what kind of file it is ^^
 
Wes
@pinepain ok, doing it
no changes from my last commit?
 
8:13 AM
nope, just curious whether it you local problem or sth
 
@ako It sounds dubious to me. A function should operate as a stand-alone thing, not include something "behind your back".
 
Wes
ok trying again
 
ako
@Sean i have an a.php file that contains a variable V , in b.php there is a function Func that inside that i need variable V from a.php
but i don't want to make variable V global
 
@ako so just pass it? public function funcB($V) { // Get the $V stuff }
@ako rather than pubic function funcB() { $V = ... }
 
ako
@Oldskool a.php is something like a config file that all other files need it's content
 
Wes
8:15 AM
same problem @pinepain
php_weak_reference.obj : error LNK2019: unresolved external symbol zend_new_interned_string referenced in function zm_startup_php_weak_reference
php_weak_reference.obj : error LNK2019: unresolved external symbol _tsrm_ls_cache referenced in function php_weak_referent_find_ptr
weak.obj : error LNK2001: unresolved external symbol _tsrm_ls_cache
php_weak_reference.obj : error LNK2019: unresolved external symbol std_object_handlers referenced in function php_weak_compare_objects
 
@ako Then in b.php require('a.php'); (should give you $V), but I wouldn't do it inside the function. Seems shady.
 
ako
@Oldskool as you know in php a variable outside a function can not be used inside a function if it is not a global variable
the variable inside a.php is an instance of connection to the database , something like this : $V = new mysqli(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
and i want to use it in all php files that make transaction from database
 
@ako So you store it once and pass it through. If you constantly include a file which is connecting to the database, you're going to have one request connecting multiple times, where you really only want it connecting once.
 
morninh
 
8:25 AM
how do I tell make test not to send an email when building an extension?
is there a flag for that? I need it non-interactive
 
@Wes thanks, it looks like i will have to dive into windows world
are there any vm image with windows and dev tools that I can start with?
 
@Gordon NO_INTERACTION=1
 
"Our widgets don't support responsive layouts" Yeah sure they don't..
e.style.cssText = e.style.cssText.replace(new RegExp('; width\:[^\;]+'), '; width:' + sb.width() + 'px');
 
thx
hmm, that doesnt seem to work
@FlorianMargaine I have to somehow pass that in a Dockerfile
I tried ENV NO_INTERACTION 1 but it will tell me it posted to the list
also RUN NO_INTERACTION=1 make test produces the same result
 
Wes
8:41 AM
@pinepain no idea honestly, i think you can use windows trials for like 30 days, though
 
I can obviously remove the make test command
 
@Wes i will test it just in TS build, it might be the problem when building TS only
 
Great news feed today on GitHub. /cc @Ocramius
 
hi is there a laravel room in here
 
a room in a room? that would be inception
 
8:49 AM
 
lol I mean in stackoverflow
 
@FlorianMargaine nvm. I forgot to save the frigging dockerfile. visual studio save doenst autosave and I am just not used to that. ENV NO_INTERACTION 1 works fine. thanks again
@undefined you can see and search all rooms at chat.stackoverflow.com
 
morngorn
 
@PeeHaa o/
 
@PeeHaa what does the donkey say?
 
user image
18
 
hahahahahaha
 
^^
 
Wes
lol
 
now passing by a donkey will never feel the same again
its like misheard lyrics
 
Gon
8:58 AM
huehuehue
 
Wes
@Gordon i have bigger problems
Apr 5 at 12:49, by Wes
@PeeHaa is that the origin of your nick? i always imagined you as cowboy shouting peeee haaa! while using an urinal and rotating a lasso
can't unsee that
 
@Wes Yeah, that was a pretty distrubing image.
 
@Wes on a ranch, with donkeys outside
 
PeeHass
 
Wes
now it's even more disturbing. opens aftereffects
morning all tho :B
 
9:04 AM
hello guys
 
'nin
 
Gon
'n
 
user986408
how would you build the request flow in a saas backend? first i thought of sessions which identify the client and then unlock client-specific routes ... or is there a better maybe stateless option?
 
i need help with a pretty standard problems but no solution seems to be working , my extensions in php dont seem to be coming on apache server
i keep getting error class PDO not found
 
@Gordon lol
 
9:06 AM
@codepushr oauth?
 
@avz2611 Then it's probably not loaded? What OS are you on?
 
windows
 
@avz2611 Plain PHP or WAMP/XAMPP?
 
plain PHP
 
user986408
@PeeHaa will take a look, thanks!
 
9:07 AM
Damn son you totally hit gold with that gif @Gordon :D
 
@avz2611 Then make sure there is no semicolon in front of extension=php_pdo.dll (or something like that) in your php.ini.
 
i did that , i changed my config in php.ini , i referred my addresses properly
 
@avz2611 And restart your webserver.
 
but apache doesn't seem to recognize it
is there something to be done with command prompt ?
 
@PeeHaa :)
 
9:21 AM
@avz2611 Shouldn't be necessary. You can try php -m|find /I pdo and see if it's listed
 
user986408
@PeeHaa it feels weird to setup oauth and use it as if i'm authenticating with my own service
 
user986408
wouldnt be an api-key sufficient in the header for each client request?
 
@Oldskool or... grep
 
@Leigh On Windoze?
 
-_-
wait, you can pipe on windows?
 
9:34 AM
I should hope so...
 
@Leigh Uh, yeah. Probably since Win95 or something.
Maybe even in plain DOS
 
After all, you need to be smoking to use windows
Need a crack pipe for that
 
@Leigh windows 10 has bash ;)
 
i never got the linux hype though , i always felt more comfortable with windows
 
kill the heathen, burn the witch
 
9:37 AM
but then again i am just the normal guy who likes a bit of coding
 
@avz2611 Depends on the context. As a desktop system for an office environment it's OK-ish. As a server, you're crazy if you run it voluntarily.
 
@avz2611 windows has such a crappy terminal. there is a reason they are adding bash to it now
 
@Gordon shrug my windows has zsh
 
@Gordon bash is a shell, not a terminal
 
9:39 AM
I use babun
 
i am planning to run my server on windows , something tells me you guys are going to laugh and shout at the same time :P
 
you can do whatever you want, it isn't what I'd do, but I can do whatever I want too
 
does anyone here have experience with building php extension on appveyour?
i'm not a windows guy so it's not obvious for me whether i have to rebuild php or it's fine to download binary, debug and devel pack and sdk and that's enough?
 
@FlorianMargaine yes, which will usually run in some sort of terminal…
 
o/
 
9:51 AM
@Dereleased now, yes ^^
 
@Sara did someone mention krak ?
2
 
@JoeWatkins seen my pings from tonight?
 
missed them
 
@NikiC are you planning to move your deprecation RFC to vote any time soon?
 
9:57 AM
that was because of stas, it was just news entries
I can't see the next one
 
@JoeWatkins ah okay … because usually it's a bad merge^^
 
10:08 AM
what was the next ping ?
 
!!is Britain still in the EU?
 
Yes.
 
Jeeves is amazingly accurate in his randomness
 
!!is Jeeves amazingly accurate in his randomness?
 
10:18 AM
see? again.
 
I'm really curious what the outcome of the Brexit-poll is going to be though.
 
remain
i think
 
No matter the outcome: Donald Trump will announce the US leaving the EU, too.
4
 
Anonymous
Donald Trump is the greatest.
 
@Gordon LOL
 
10:22 AM
we should do a kickstarter, someone needs to fund my exit from earth if that idiotic guy gets into the white house ...
 
Anonymous
As much as this sounds trump-ish, I would vote for him before Hilary on any day.
 
Anonymous
/now i'll see myself out
 
you would vote for someone who is ignorant, arrogant, and stupid ?
 
@samayo I dont see any irony tags?
 
Anonymous
@Gordon The first statement was a joke, but I'm serious about the second one.
 
10:32 AM
@samayo why?
 
Anonymous
Because I can't stand Killary Killinton.
 
why?
 
Anonymous
Now it's your turn for them irony tags :)
 
Politics and facebook should not go together
This whole election has been a farce on my social network feeds
 
Anonymous
I don't use facebook.
 
10:36 AM
@samayo no, tell me please. I have a hard time understanding how anyone with at least two ounces of intellect could even remotely consider voting for trump. so I dont get why you would say that.
 
emm ... and?
so you are saying that there are only two candidates to vote for?
 
Anonymous
@tereško Nope. I meant if it was only between Hillary and Trump.
 
Anonymous
I wanted Bernie like everyone else, and Ron Paul before that ... but the God's haven't answered my prayers. Now, I'm left in-between a rock and hard place.
 
@Leigh No, I don't have time
 
Anonymous
Donald is just the lesser of two evils.
 
10:39 AM
!!docs array_reduce
 
[ array_reduce() ] Iteratively reduce the array to a single value using a callback function
 
@samayo wtf?!
 
@NikiC ok, that sucks, was hoping you'd cover the deprecation of rand etc for me :P
 
@Leigh The deprecation of rand is an obsolete part of the rfc
aliasing rand to mt_rand is better
btw, ignore the stupid on the internals list
 
@samayo ... I have always found this phrase funny: "God's haven't answered my prayers" - you believe there is an all-powerful, all-knowing being, that made a univers according to its plan and it has been following that plan for eons ... and now you want this being to change this plan
it's kinda funny ... you are essentialyl saying: "your plan is shit, I have a better idea", @samayo :P
 
10:41 AM
I didn't really follow it, but there's a lot of known low s/n people involved in that thread, that you can safely ignore (like fleshgrinder)
 
@NikiC Yea they got so quickly side-tracked, kind of demotivated to comment on a lot of it
 
@Leigh I think the only potentially controversial part of your rfc is to replace mt_rand with a totally different generator, everything else should sail through
 
I'll do a summary post this weekend and make a final set of proposals
I think I might even remove the "insecure usage" part and try and get that done as an independent patch, because it's security sensitive
 
Anonymous
@tereško I hope you didn't think I literally prayed and expected a result. It's just a simple expression.
 
@samayo I hope you didn't. I am just saying the both the expression and people how who honestry try it are ... well .. strange
that said
emm, any news on Brexit?
 
10:47 AM
brexit happening
 
@tereško as are the people who would vote for trump. to say it politely.
 
tbh i think it's better if trump is the president
 
@Gordon some of them might actually using it as a protest, because the whole presidental election process in USA has become farcical
 
because USA is smart enough to not let him handle matters so he would only be a puppet whose words wont patter
btw who here is from england?
 
Anonymous
@tereško Because you're interpretation of the phrase is a bit off.
 
10:52 AM
@Leigh insecure usage?
 
@Gordon btw, it is possible that neither Clinton nor Trump gets the nomination, since conventions still havent happened yet.
 
@avz2611 <-
 
@Sean are you actually voting in the referendum?
 
@tereško Yes, I'll be voting tonight.
 
you for or against?
 
10:55 AM
@NikiC i.e. php_rand being used to salt crypt
so you can get repeatable salts with srand
 
@avz2611 there is also option "not sure yet"
 
if brexit happens can it reenter later ?
or EU collapses ?
i am pretty confused by this issue :P
 
yes and maybe
it's tricky
 
@Leigh ah right
 
My partner isn't voting, she says she doesn't know enough about both sides objectively to make an educated choice
 
10:58 AM
and, TBH, both sides have good reasons ... and over exaggerated propoganda
 
your partner is sensible
 
@Sean that's something I can approve of
 
on the other hand she doesn't trust you enough :P <jk>
 
:P
 
@tereško I'm sure you'll put this to good use.
 
10:59 AM
@Sean that's my stance, with the addition that I don't care enough / too lazy to put in the effort to know enough to make an educated choice
 
@Fabor as a phone wallpaper? What's the context?
 
Something for when someone annoys you.
Or to say hello
 
meh
looks annoying
I look for higher production values in my animated gifs
 
Anonymous
@JesusErwinSuarez Is that your real name?
 
11:07 AM
Yes
Jesus Erwin is my name
Suarez is my family name
 
@NikiC I thought Lester would be exemplary here … or is Fleshgrinders s/n even lower?
 
@avz2611 Britain could re-enter but it would be very unlikely given that as a new entrant it would need to join the Euro and the Schengen area. Neither of which are popular with British people.
 
@bwoebi Fleshgrinder posts a lot more. In any case, they're the two people on my "mark as read" list, so I no longer get to see their, ah, valuable input
 
@tereško This is the truest EU comment I've seen in about a week. Both sides have good arguments but they refuse to make them because the fear tactics are more saleable.
 
11:22 AM
php community is really like advices to beginner
 
I'm really disappointed there's no mention of phpdbg :-D
 
@MattPrelude @tereško fwiw, to me being pro-brexit sounds a lot "make UK great again"
 
@Gordon In the same tone as Trump says it for America.
 
@bwoebi phpdbg -p is great :P
 
@NikiC and everything else? ;-P
 
11:27 AM
@bwoebi I never used the rest ^^
 
@Gordon to me it's more of "EU system is fucked up and getting really scary"
 
yes.
 
@NikiC See, that's the issue :-D
you're so used to gdb, but don't even use phpdbg… why…
 
@tereško maybe, but not half as scary as the alternatives
 
@Gordon and the anti-brexit argument being: "we are a fucking island, all our shit goes thriught the mainland"
 
11:29 AM
@bwoebi I find the commands unintuitive
 
user3119231
Pro's & Contra's to echo HTML in PHP?
 
user3119231
I mean if I have a condition which says if the HTML should be generated there is no other way, or?
 
I tried doing opline level debugging with it before, but I never could figure out how to do it :D
 
@NikiC Agree, it should be just si instead of some set command
 
@Gordon depends on what you care about more (and are scare about more). That is the at crux of the whole debate.
 
11:31 AM
@NikiC set stepping opcode is it, and then normal step command… Thanks for feedback :-)
 
I was anti-brexit. Untill I heard about shit they are pulling with "EU army" (both about the fact and the shifting of the announcment date). Now I am just confused.
 
@bwoebi I think I actually got to that point but then couldn't figure out how to run the file
 
@tereško EU army? What? Link?
 
oh ... and there is the shit Soros is trying to pull off again
 
As in, start stepping right away
 
11:34 AM
@NikiC needs breakpoint on first line… Perhaps, step with no run active should just start it…
 
@bwoebi how are the watchpoints coming?
 
@NikiC Will try my first compile today… I've rewritten watchpoint handling logic (not just refactored a bit…)
 
"I think I know 50% of the people at the games – or at least recognise them." Iceland's Kari Arnason.
:)
 
It's the third time I'm writing this thing @NikiC ^^
 
unfortunetally you have to dig through buttload of conspiricy sites to get to actual articles
anyway, I'm AFK for an hour .. need to mow the lawn
 
11:40 AM
@tereško If it's serious … actually, I don't think it's that bad of an idea … at least nowadays we have some EU members doing things here and there … perhaps more concentrated efforts are better …
 
@bwoebi I dont have the experise to comment on that ... but reception has been kinda bad from military related people
anyway
 
its almost frydai !
 
@tereško I can imagine that as they loose some control about forces …^^
 
Anonymous
How do you people get a tag inside an element?
 
Anonymous
11:48 AM
<h4> <a href='#'>foo</a></h4>
 
Anonymous
I have h4, but still trying to get foo.
 
with a html parser?
 
Anonymous
child node is upto no good.
 
Wes
$h4->childNodes->item(1)->textContent
 
Anonymous
Ah, I missed the item.
 
Wes
11:50 AM
it's 1 because you have a text node before <a
 
do you mean "space"?
 
ThW
$xpath->evaluate('.//a', $h4)
 
Wes
@AdilIlhan yes, which is a text node.
 
ThW
If you need only the text of the first a, $xpath->evaluate('string(.//a)', $h4)
 
@samayo Do you want the "tag" (element?), or the text inside it?
 
Anonymous
11:54 AM
@salathe The text.
 
Anonymous
<h4><a href="http://www.foo.bar/tar/" title="Avenue ... env. 71 m2">Avenue .. Surface commerciale..</a></h4>
 
Anonymous
I need the link and the text of the link.
 
Wes
$a->getAttribute("href");
$a->textContent;
 
Anonymous
Somehow I have messed up something. I created a wrapper class for the dom and it's now working properly.
 
Wes
wrap all the things! #thephpway
 
Anonymous
11:57 AM
@Wes There are many a tags, I can get the h4, but not the href and text.
 
Wes
$h4->getElementsByTagName("a")->item(0)->getAttribute("href")
$h4->getElementsByTagName("a")->item(0)->textContent
 

« first day (2077 days earlier)      last day (2870 days later) »