« first day (2109 days earlier)      last day (2832 days later) » 

3:00 PM
Hello ladies and gents, I'm here for the badge. Please star this post :) Thanks!
 
um... no?
not how it works...
 
You must earn the star!
 
Wes
omg i want it i.imgur.com/kXrBj.jpg
 
Yeah, looks like the star'd posts are high quality (read sarcasm)
 
^ Not star worthy
 
3:03 PM
@Wes Yeah, I remember when Ken lay landed on the Go To Jail square...
 
Wes
ehehe :P
 
Losing that game was painful...
 
Ok ok, ill try harder.
Why do Java programmers wear glasses? .... Because they don't C#
 
boo
 
/me throws tomato
 
Wes
3:06 PM
@Fabor *tomcato
 
*Not IRC
 
Epik slaps Fabor around with a large trout
 
mmmm trout
 
@Epik Nope. Try a generic gay for @rdlowrey comment. They usually perform well on stars. Or defamatory statement about PHP.
@PeeHaa's mother is easy too.
 
3:12 PM
Hey, I've made plenty of defamatory statements about PHP here, why don't I have any starred messages?
 
@rdlowrey Got stuck in the shower because the instructions on the shampoo bottle said Lather, Rinse, Repeat.
 
What a fine moment to get in here :)
 
Aaaah home from work
 
@Epik you will have to say something relevant to earn it
4
 
re
 
3:12 PM
o/
the irony of trolling through the appliance of stars
 
What's relevant? There's nothing going on here here other than regular old chat stuffs
 
@Epik Nothing going on...? Magic happens in here.
 
NOTHING???!?
 
@Wes That was done already? wiki.php.net/rfc/class_const_visibility /cc @PeeHaa
 
Did you hear Yahoo was finally sold? Apparently @Peehaa bought it. He's gonna rename it Hoohaa
 
Wes
3:15 PM
 
@Machavity: I'd use it.
 
lol hoohaa
 
Lets see this magic @Jimbo - This isnt church where the magic is imaginary
 
anyway, I have a sad problem: how do I cheaply check if column is not there in mysql_* ?
 
@Epik Well, all we need to do is get @PeeHaa's mum in and the magic happens
 
3:16 PM
@Jimbo from what I hear, she's omnipresent
 
@Epik Yep, she certainly is widespread
(I'm glad you can triple-tap on a word on OS X and it'll bring up dictionary / thesaurus for it ;-))
 
@tereško can that column contain NULL "values"? - And what would be expensive if you ask for cheaply?
 
@Jimbo I used to have a gnome extension that did that, it is nice.
 
Wes
and i'm already doing it. it's taking hours, but after 5 billions assertions i can be 99.99999% sure that everything works. :B but.... hours. luckily i'm not going to change this too often...
 
@Jimbo - See, You can learn new something every day
 
3:19 PM
!!wotd
 
chiasmus: a reversal in the order of words in two otherwise parallel phrases, as in “He went to the country, to the town went she.”
 
@Epik Is that your bike?
 
Yep, 2015 GSXR 1000 - Sorry to hear that, never a good time when the rubber comes off the road
 
@Wes I don't test like that....At least for the stuff 'domain logic' I write, I test that stuff works for a reasonable number of inputs.....I just don't care about people who are abusing the code that much. e.g. I test that passing in a path string of 20 characters works.........If someone else wants to pass in a path string that contains 20,000 and something in my code breaks....they can fix it then. Or if they're paying me money I'll fix it.
 
@Epik It's a Gixxer right? I recently crashed my Panigale :-(
There's a few others on bikes in here
 
3:20 PM
But I get a lot more value out of writing tests that prove stuff works - rather than proving my code is resilient against Ellington's First Law.
 
@Jimbo 2015 GSXR 1000 - Sorry to hear that, never a good time when the rubber comes off the road
 
On the other hand - there are cases where it is valid to test all the things: randomascii.wordpress.com/2014/01/27/… @Wes
 
@Danack What is Ellington's First Law?
 
SECURITY
 
"You can make it idiot proof, but you can't make it c**t proof."
8
> If someone else wants to pass in a path string that contains 20,000 and something in my code breaks....they can fix it then.
 
3:24 PM
@Danack You can't make it idiot proof.
They just make better idiots.
 
My job consists of making things c**t proof. :(
 
Wes
@Danack lol. that totally makes sense
 
E_TOO_MANY_THINGS_TO_STAR
 
I think some people have a gift for finding edge-cases. Like when the user presses T, Return, $, Q, does a spin in his chair and loads chrome, the app crashes.
3
 
@MadaraUchiha Fools are the most ingenious people in the world
 
3:27 PM
@Fabor The day I learned to never underestimate a tech-illiterate person's ability to break things was when I finished something for my dad after testing it myself for over a week, from every angle I could think of.
He broke it in 3 minutes.
 
Wes
lol
 
@MadaraUchiha - Never expect people to follow instructions, only expect that they will click and keymash at every chance they can.
 
@MadaraUchiha Did you look at him and go "Why the hell would anyone do something that way?"
 
@Epik UI is like a joke.
If you need to explain it, it's already pretty bad.
@Machavity That's what I thought at the time.
Today I realize it was my fault for not making the UI clear enough on its own
 
@MadaraUchiha lol yes. It's amazing really.
 
3:31 PM
aw crap. I can't find that experiment in docs room :(
I was in for a popcorn moment
 
Ekn
@MadaraUchiha Maybe it was Tajima's sharingan
 
@Epik Making thing chat proof sounds fun.
 
Oh boy oh boy oh boy, time to get out GDB again!
 
@Ekn I seriously doubt that :D
 
Ekn
3:34 PM
:-D
 
@MadaraUchiha Bah... I'm sure they meant "cyst" there...
 
@JonClements He clearly meant this very room./
 
Oh... a cult, right? :p
 
@JonClements Exactly.
 
Not sure if anyone can help figure anything out here, but I have some tests that pass perfectly fine locally, but when Travis runs one of them, it fails and it's a really simple test... Just can't figure it out
(or point me to how you would figure it out, I thought about adding some var_dumps for travis to spit out)
 
3:40 PM
@Jimbo can you validate the twitter response? Possibly that it fails there
 
@Epik When you look at the output of travis it's getting back an empty array ([]), but "it works on my machine"
 
@JonClements PHP isn't a cult. We command 58% more respect than PERL
 
Its always going to get an array, because it returns the error as json. Perhaps its failing because of the response code
 
@Jimbo and only that test too
Other tests that use the same object type and settings succeed.
 
@Jimbo lol @ that fix :-P
 
3:47 PM
:D
Tbf, this is an SDK that relies entirely on their API functioning, so I'm not testing it on it's own merits, it's an integration test
 
Can't you just use PHP_INT_MAX there anyway?
 
But it's an integration test that should work
 
...as long as their API is working, which it may not be
 
@DaveRandom I'm using actual tweet IDs
 
3:48 PM
Yeh but do you actually have to?
 
@DaveRandom But it does now :P
 
I guess they aren't incremental anyway
maybe they are, but those numbers are big
huh, maybe they are
 
@DaveRandom Well it's testing that the first tweet "Test Tweet" does indeed exist (so it can read from the timeline correctly). I guess I could just check for an non-invalid response
 
@DaveRandom Huh? What numbers?
It's all strings
@Jimbo It's a valid response. It's responding with an empty array.
 
Tweet IDs are numeric though (talking about this "fix")
 
3:50 PM
@MadaraUchiha My test sucks then ha
 
Sorry Newbie question but could anyone give me abit of info how i would get this code displaying in this format 12.34,12.45,12.43,13.01 with the last comma removed from the end?

if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$volt = $row['volt'].',';
}
}
echo $volt;
 
btw @Jimbo still no move away from monolithic class with hateful API? :-(
 
@DaveRandom I know, it's just shit isn't it, but tbh my thought goes like this ... if someone wants to use a proper one, there are many many others out there
I think mine caters for people who don't know what composer is. Still, going towards 300k downloads though, not bad!
 
@Bibsta Collect them into an array, and use implode()
!!docs implode
 
[ implode() ] Join array elements with a string
 
3:52 PM
@Jimbo Ah, there's the problem. $this->assertContains($expected, $data); should be $this->assertNotEquals('Twitter' , 'Relevance');
 
meow
 
Cheers @MadaraUchiha will have a play now
 
@DaveRandom Nailed it ;)
 
4:12 PM
is it advisable to recycle domain objects
		/**
		 * Header
		 */
		$this->rule->setType('exclusive');
		$this->rule->setModuleName('smart-abc-search');
		$this->instructions->addRule($this->rule);

		$this->templateSection->setType('header');
		$this->templateSection->setHandle('acura-template-3');
		$this->templateSection->setInstructions($this->instructions);

		$this->template->addSection($this->templateSection);

		/**
		 * Body
		 */
		$this->templateSection->setType('body');
		$this->templateSection->setHandle('acura-template-3');
here, templateSection is being reused
 
@Bibsta Or just move the separator to the other side:
$separator = '';

if ($result->num_rows > 0) {
    while ($row = $result->fetch_assoc()) {
        $volt = $separator.$row['volt'];
        $separator = ',';
    }
}
@Jeremy no.
Not sensible.
 
Cheers Danack thats kinda handy :)
 
Gon
4:36 PM
Evenin'
 
5:05 PM
how to change timestamp into data in php
 
Gon
!!? how to change timestamp into date in php
 
timestamp not wokring when i do date('d/M',$timestamp); where $timestamp =2016-07-22 18:37:34
 
Search for "how to change timestamp into date in php" (https://www.google.com/search?q=how+to+change+timestamp+into+date+in+php&lr=lang_en)
• Convert timestamp to readable date/time PHP - Sta… - How can I convert that to a readable date/time in PHP? I have tried … strtotime makes a date strin… (http://stackoverflow.com/questions/5213528/convert-timestamp-to-readable-date-time-php)
• PHP: DateTime::setTimestamp - Manual - DateTime::setTimestamp -- date_timestamp_set — Sets the date and time based …. The function will c… (http://php.net/manual/en/datetime.settimestamp.php)
 
Gon
afaik '2016-07-22 18:37:34' isnt a valid timestamp..
 
huh ... now this is odd
I am suspended in SuperUser
 
Gon
5:08 PM
heh... was it a whole SE wide ban tho?
 
@MadaraUchiha did I accidentally trigger a bug or is that the expected behavior?
(not that I actually care about SU site .. it's just really odd)
 
@virepo not sure if this will help might have to change it about abit to get it working for you
$date = date('Y-m-d',strtotime($timestamp)); //Data
$time = date('H:i:s',strtotime($timestamp)); //Time
 
@tereško I'm actually not sure.
 
wait, no, it's actually stranger
I am not suspended on SU main site, only on SU chat site
 
@Danack I just puked a little in my mouth.
@tereško Oh, SU?
What have you done there?
 
5:11 PM
yes, SuperUser .. and I even where there once in blue moon
it's some propagation bug, it seems
anyway, you can pass it up the food chain, if you also think it might be a real bug .. now I have to pick a new game to play
 
Terraria
 
I had a Terraria-binge about a month ago
 
Rocket League
 
Bad Rats
 
@tereško Yeah, probably.
I've unsuspended manually.
 
5:16 PM
you should have left it as it is and passed on the bug
I really could have lived without trolling about AMD vs NVidia for a week
 
I'm sure you can get rebanned @tereško. For science.
9
 
I suspect it might have had some "race condition" involved, since multiple admins might have tried to ban ASAP
(no pun intended)
in JavaScript Go! Gotta try { ... } catch (em) { ... } all!, 5 mins ago, by corvid
export const STRONG_PASSWORD = /\w+/;
 
5:34 PM
purrfect
 
5:51 PM
I am looking at this sample file (not as a way to do thing, I know this is not the way we do things), and I'm seeing this:

$file = $_FILES['file'];
@copy($file, ...

Does that work? Isn't the value of $file an array? I'm reading through the source and I can't find any way that could work, and I am not sure I want to "test" this file...
 
6:13 PM
what
you wanna know if you can run a script you dont understand? =)
 
guys i have a question
<?php

if($_SERVER['REQUEST_METHOD']=='GET'){

$work = $_GET['work'];




require_once('dbConnect.php');

$sql = "SELECT * FROM user WHERE work='".$work."'";

$r = mysqli_query($con,$sql);

$result = array();

while($res = mysqli_fetch_array($r)){

array_push($result,array(
"id"=>$res['id'],
"name"=>$res['name'],
"username"=>$res['username'],
"email"=>$res['email'],
"age"=>$res['age'],
"password"=>$res['password'],
"work"=>$res['work']
)
);
}
echo json_encode(array("result"=>$result));

mysqli_close($con);
this my code , i we enter the work it displays the name who is working on it
i just want a change in this code
i want to enter multiple works
try this link
 
You have SQL injection vuln. as you did not sanitize the user inputted value before passing it to the sql statement.. allowing the attacker (Madara Uchiha) to alter the query
He was even so nice to supply a link as proof-of-concept .. its a quick way to learn
 
abr
6:34 PM
guys, question, I'm thinking starting a project (for learning purposes) of a mobile app chat and a server.
I don't know where to start on the server part, on the mobile part I was thinking maybe xamarin
 
!!package amphp/aerys
 
[ amphp/aerys ] A non-blocking HTTP/Websocket server
 
Websocker sever @abr ^
 
I used that ages ago, I need to take a look again
I ended up going for Ratchet w/ ZMQ simply because of documentation
 
Being able to ping the maintainers > docs :D
 
6:38 PM
I know, but I think with all my questions I was peeing Dan off, this was a few years ago now, we had a private chat (I still have that somewhere, and it still doesn't make sense to me completely :D)
Still, I'm going to take another look. I really like the OO API on it
 
abr
Thanks guys, I'll take a look
any heads up?:P
 
Sure, be prepared to learn a lot :-)
And even if you don't get very far, you'll still be further ahead than when you started
(this goes for anything, really, though)
 
abr
I'm a newbie at this still :P
I've made a restful api in laravel before but that's about it xD
 
Gon
6:55 PM
Noite.. o/
 
@abr make mobile part browser with websockets and server something that listens to those sockets
... and if you need to make it look like proper native app, use webview
 
is there a way to block countries not in the US from accessing my website via php?
is it even possible or would you think it is irrelevant since people can spoof the IP address
 
Anonymous
@Gon night o/
 
Anonymous
7:14 PM
@PeeHaa All in tact, nice job :D
 
7:29 PM
@chronotrigga Yes, there are ways. Many of them.
 
!!rfcs
 
@epik Can you give some insight? I only know of the .htacess and blocking IP addresses but it seems futile. what is the most efficient way?
 
7:34 PM
oh the feels. chrono trigger
ugh. quick, where's the nearest emulator and rom
 
@chronotrigga dont forget to star my response, as im only here for the badge :)
 
my bad i don't use chat often
@epik technically with this couldn't the user still spoof their IP and this would be irrelevant?
 
@chronotrigga For everything you do, someone will find a way to undo it. Fact of life you will have to deal with.
If you wanted to go crazy about it, you could combine GeoIP with blocking every known VPN, Proxy and Tunnel provider (The netflix way). This would be quite the task.
 
Anonymous
7:51 PM
@AdilIlhan heh
 
hey wordpress guys.. I'M looking the best way to trigger an error into the profil page in administration. I tried something like:
add_settings_error(
            'typeuser_invalid',
            esc_attr( 'typeuser_invalid' ),
            __( 'Profil type invalid', 'Exchangetrans' )
        );
       return false;

but it doesnt work.. I saw a green bar with: User updated.
 
hm ok. why add_settings_error not work properly? it is only for the custom post type or custom settings page?
 
@Jean-philippeEmond did you read the documentation completely? Try the function provided, and modify that.
 
I understand that I need to use it. but. well.
thanks @Epik
 
8:01 PM
@Jean-philippeEmond Your function is completely wrong (or incomplete) - Else i would have given you a proper answer. The doc is the fastest way for you to get a correct function
 
If I have a question about another question, can I ask that question in here?
XD
 
"Don't ask to ask" - did you just break that? ;)
 
@blahfunk You've reached your quota for today, try again tomorrow.
 
lol
@Jimbo Yeah, actually, I have a question about that
hahahahahaha
sorry... getting slap happy this afternoon
 
8:05 PM
if the question that you asked is the question by itself, well you'll ask the question here. But if your question that you asked is not the question that you want to ask. well, you dont respect the rules. :P
 
well what if the question contains elements of both itself and other subject matter? Now the grey begins
 
come back in a while
 
@Jimbo dont asks about not asking to ask
 
lol
 
@tereško You're right, I did ask about not asking to ask, shit.
 
8:16 PM
every time I see that I think, "how can I confusingly ask a question about a question?" Any other ideas?
^^ asking about a question...
 
damn... i need a new name for my engine...
 
Enigne
 
how enlightning @RonniSkansing :)
well underware didnt hit has hard as i thought :)
 
what =) I dont understand that. Enigne was a suggestion for the new name
 
Feel free to retweet, no pressure, ㅎ_ㅎ.
.@thetrainline Why am I shown a scam after buying a ticket? Hiding subscription in small print is a deliberate trick https://t.co/3bafAPR2ZN
 
8:24 PM
wow
nice avatar
 
@RonniSkansing that sarkasm <3
 
it even looks like ya
 
yeah....I went sunbathing
 
8:35 PM
what is about "swirl"
silly?
 
@ceed How about, Larashit? Oh wait, if you write good code then you can't call it that.
 
@Jimbo such provication :3
well if it goes after teresko i write shit :)
 
Anonymous
@ceed UGarnment
 
@JayIsTooCommon Sympony
nah, since it is a "language" i need something catchy and short
 
@ceed engine of what ?
 
8:47 PM
i parse/compile indent styled templates like jade (jade-lang.com) into whatever language you want to be put out
 
wtfml
 
better said i'm doing a template engine which is able to output any code you want as long as either a user has written a language support or you are nuts enough to write your own
that is actually pretty funny ;)
i was stuck on underware for a while because it's lying directly under your frontend
but that idea was kinda silly i gues
ryse, rice, rise, rinse ... ravioli, i hate finding new names
 
name all your new project by random pokemon names
 
nebulak
 
9:10 PM
@tereško such combination. shamelessly stolen. much amazed. very clever.
 
@FélixGagnon-Grenier you mean there is such a thing?
(sorry, I have not kept up with all the bullshit markup languages since I was exposed to HAML)
 
!!urban wtfml
 
[ [WTFML](http://wtfml.urbanup.com/4156981) ] A compound-acronym of the two closely related acronyms of [WTF] and [FML]. It means: What The Fuck My Life. WTFML can be applied to many unfavorable circumstances. Under normal circumstances, the WHAT THE FUCK portion comes first, followed closely by a heart-felt FUCK MY LIFE. When typed from a computer, it is an absolute NECESSITY that the caps lock be left on to convey the appropriate intensity.

WTFML is NOT to be mistaken for "When [Twats] Farm Major Lice". If you ever hear anyone use WTFML to describe an instance when twats farm major lice,
 
I'm just now being exposed to that for the first time. That's pretty much an instant favorite
 
I just finished reading Joe Watkin's tutorial on 'hacking' PHP via the AST: blog.krakjoe.ninja/2016/03/hacking-php-7.html Are there any other more in depth resources on how to extend PHP via AST?
 
9:20 PM
my first reaction would have been to open a beer, but I like your style
 
Wes
evenings
 
@Wes \o
 
Anonymous
Am off, night all o/
 
10:22 PM
morning
 
@bwoebi what kind of "morning" is that?
 
when to hell with cooking for tonight, I'll just order sushis
 
@NikiC Well, I'm awake for like 5 min…
@NikiC … or what did you expect?
 
@bwoebi no, no, I did expect just that
But it might've been UGT as well
 
10:28 PM
I'm not that one who uses UGT in the middle of night :-D
My god @rdlowrey … You want to write this ampq client since the dawn of time 8 months or so… Is it really that hard to find a tiny timeslot at work to do work related work [like writing this client]?
 
UGT? Unpleasant Gnomes with Tasers?
 
"ugt" is the sound someone makes when you punch him in the solar plexus
 
Wes
@Sara google says you just invented a new combination of words :B
 
... or so I have heard
 
10:51 PM
morning \o/
 
Wes
@pinepain i thought notifier got called before gc now?
 
@DejanMarjanovic not worth of mentioning, it's just your morning unserialize exploit; nothing atypical.
 
Haha ... it's funny because it's true; and sad; at the same time.
 
I guess finding gr8 programmers that would accept to meddle in making pr0nsite is hard. Well probably @PeeHaa would do it. Hell he probably already did.
 
I am not worthy of Pr0nhub
mindgeek.com they are in @bwoebi - landia
SOON
 
11:07 PM
32 boulevard Royal, L-2449 Luxembourg City, Luxembourg << hmm, that's like 6 km away
 
Do it @bwoebi
 
@DejanMarjanovic mhm, nah … at least not now :-P
 
shit... the delivery guy arrived with the sushis.. didn't realize I ordered 35 of em, with two soups.
 
guys hw can i use regex to match tag that has ' ' ' as child
eg OK
>
she's here
<

not OK
>
shes here
<
tried phpliveregex.com/p/gwS using preg_match_all
 
11:12 PM
@bwoebi For the time will come, young man
@FélixGagnon-Grenier Bon appétit... that will take a while.
 
Wes
@pinepain must work the same way as creating a new reference of $this in __destruct (except that doing so would be really bad :P) but yeah... it's the same behavior
@bwoebi is it actually a requirement these days that stuff like #if #else #endif start at col 0?
 
@Wes I don't know the standard well.
but even if it isn't you really should do that…
what is definitely possible, is inserting tabs between the # and the (e.g. if) keyword
 
Wes
that's another barrier. reading code without indentation is a pain
 
Wes
11:22 PM
yep that's something but i would rather indent all the line if it makes sense
 
Q: Where can I acquire elephpants these days?
 
Wes
also what indentation is preferred for php's c code? tabs 8 width? @bwoebi i've seen both though
 
hi
@Wes can u send post request to this hussein.iranh.ir/TestServer.php
using postman
i get error
 
@Sandro Hey there. Welcome to php chat. Not sure if you're new, but I don't think I've seen you yet.
my point is simple: don't, ever again, ping someone because they happen to be there, so that they help you
 
thanks
 
11:31 PM
Hey @FélixGagnon-Grenier
 
if you have a question, write it down, ask it once, and someone with the time or care will answer
 
Just kidding.
Good night :)
 
the problem is that i can't ask in stackoverflow that many people will post to that address
and webDown
I just got confused
 
I am presently quite confused by what you are trying to say
 
11:33 PM
I get this from server
im going to send post request to a php file on the server
using PostMan app in chrome
and get error
java should have to be enabled, i haven't had this error with postman before
and even don't know what happened, i'm not php developer, i work android
 
I think you mean javascript
 
can u send post request to this address i share
with this value
actionone
actiontwo
 
nope. I just clicked and it directed me to some spammy site with random asian ckicks.
I won't be interacting with this again
in any event, slow down
 
ok, maybe i should have to be generous to buy a host and domain!!!
that was free host and domain
 
@Wes I use 8 locally.
stackoverflow.com/documentation/proposed/changes/52005 {someone with the necessary curl knowdledge…}
 
11:41 PM
@bwoebi I hate the editor sometimes. Makes code examples harder to read
@bwoebi Without executing it, it looks like real CURL multi
 
@Machavity looks like … but I'm asking here as I'm not 100% sure
 
i have a android app which save user data to server and handled with php in server. i test my app on localhost and now im going to pay money to set it on web. what should i have to buy. host or server
 
I think some people shared that digital ocean service's name
I'm stupid so I stick with amazon web services.
 

« first day (2109 days earlier)      last day (2832 days later) »