« first day (2026 days earlier)      last day (2936 days later) » 

1:00 PM
That means your code doesn't do to $cnt++
*doesn't go
 
ya exactly
 
@MadaraUchiha Italy is demanding FB hand over a fake account used to harass a user there. Not a good week for them worldwide
 
Try to use var_dump or check your loop
 
@MadaraUchiha Sigh. That's just sad.
 
@jack
not working
 
1:05 PM
@Machavity Well, that's FBs bad for not handling the abuse case.
If you don't want the cops to be called on you, handle the goddamn abuse in-house.
 
 
@MadaraUchiha yeah, never abuse someone in public. Always abuse them in-house. No witnesses.
 
@Gordon You done?
 
@MadaraUchiha yes.
 
What do you get when a dragon sneezes?
A: Out of the way
 
1:08 PM
@Andrea Like … I've increased sample rate to 50 µs … now 3.4% of the samples (i.e. of 300k samples) are in bind_static…
 
D:
 
lol
 
I guess you've triggered some pathological case thing
 
> Gordon has been kicked from PHP by Madara Uchiha ♦ and cannot return for 1 minute.
 
maybe read the asm? :p
 
1:09 PM
@MadaraUchiha mod abuse!!
 
@Gordon Go to meta
 
@Andrea The asm is a few movs and few tests
that's all
 
huh…
call the red telephone? :p
 
@MadaraUchiha that's what you get for electing a dude with an anime avatar.
 
1:12 PM
lol
 
@Andrea the only thing I can guess it's hitting some write dependency in the movs…
 
looks around nervously
nobody tell them I use anime avatars everywhere except the places with my full name…
 
which anime characters do you use?
 
Fezzes Anime avatars are cool.
Joinnnnnn ussssss
 
^ dat
 
1:14 PM
yeah, in kindergarten :P Please kick me again @Madara
 
Shots fired.
 
shorts fried
 
@Saitama a long list, but currently Nanoha is the main one
 
@Gordon Are you sure?
I could, if you really wanted to.
 
@MadaraUchiha do it
 
1:15 PM
@MadaraUchiha let me think… no. not even in kindergarten
 
Alright, that's enough mod abuse for one day
Time to get back to work
 
@Andrea nice!
 
^^
oh right yeah I should be studying German not wasting time in PHP chat
 
Okay, let's write German in here … :-D
 
Neiiiiiiiiiiiiin
Das wäre eine schlimme Idee…
 
1:17 PM
shit....
 
@Andrea Was hast du denn schönes oder auch nicht ganz so schönes zu lernen?
 
German is wierd
 
@Saitama I think they're threatening to conquer Poland.
 
@ziGi ya
 
@MadaraUchiha laughs in german
 
1:18 PM
@MadaraUchiha Nur Polen? Ganz Europa, natürlich
 
@MadaraUchiha did you just call us nazis?
 
@Gordon Did you?
 
@MadaraUchiha did you?
 
@MadaraUchiha 1.9.39
 
Was ist hier passiert? Wieso sprechen wir jetzt Deutsch?
 
1:19 PM
is a networking issue concerning a LAMP installed on VM player a legit PHP question ?
:d
 
@Oldskool Wir helfen alle nur @Andrea beim Lernen… :'-D
 
@Oldskool not you too.... D:
 
@bwoebi ähm, was bedeutet das? Irgendetwas wie „Was musst du gern lernen? Oder nicht gern?“?
 
Jay
Would someone kindly help me with a query please?
I have a db table which has a column called: source
 
@NikiC great talk man, congrats!
 
1:20 PM
can we go back to english pls?
 
@bwoebi Wirklich diskutieren wir wie es möglich wäre, PHP zu zerstören, aber man muss nicht das auf Englisch sagen…
 
Jay
I want to have 1 query and group the results by the source
 
@Andrea "What nice or not so nice things do you have to learn?" … wortwörtlich übersetzt
 
inb4 nein
 
@bwoebi ah, ich verstehe, danke
 
1:21 PM
@Andrea s/Wirklich/In Wirklichkeit/
 
אנגלית בבקשה, תודה.
 
!!translate übersetzt english
 
@bwoebi :)
 
@Gordon Nein nein nein nein.... OK that one was too easy ;-)
 
tout le monde se met a parler sa propre langue maintenant ?
 
1:21 PM
@MadaraUchiha hebrew?
 
@Saitama כן
 
@Gordon いいえ。
 
@FlorianMargaine Mais bien sûr ;-)
 
Summon the mods
 
@Florian Bonjour, tant qu'a faire :D
 
1:22 PM
Engels alsjeblieft
 
Hallo, ich bin anmol
 
@Machavity To think that that image is 15 years old
:\
 
@Machavity Heheheh, classic
 
@Andrea Beantworten darfst du die Frage dennoch
 
1:23 PM
ఏం మాట్లాడుతున్నారో కొంచెంకూడా అర్ధం కావట్లేదు :(
 
Ich denke, dass wir viele Sprachen benutzen sollten, and switch language mid-sentence, um Leute zu verwirren…
 
@Andrea Ich denke que c'est une idée grandiose which should be applied everywhere im Leben!
 
@bwoebi natürlich, aber ich will nicht :p
 
I thought bwoebi was Greek
3
 
@bwoebi 同意する!
 
1:25 PM
@ziGi good joke
@Andrea It's nice as long as I actually can understand the language :-P
 
maybe I got confused that the Greek owe you money, something like that
 
@ziGi wut?
 
sorry, I thought we are listing facts
 
@bwoebi (In der Tat kann ich nicht Japanisch sprechen…)
 
@ziGi I'm confused … why should the Greek owe us money? I'm not German…
@Andrea (Nur verstehen zum Teil, richtig?)
 
1:28 PM
@bwoebi Greece owe us all money
 
@PeeHaa yeah, indirectly via ESM etc. maybe, but not directly
 
@PeeHaa They damn well do.
 
@bwoebi genau
 
@bwoebi That's as direct as it gets... If it weren't all fake digital moneyz we would been handing over bags of cash
 
@PeeHaa Apple should bail them out
 
1:29 PM
@Andrea :P
I like that idea
 
@Andrea Even they don't have enough cash ^^
 
Apple has about enough cash to that, and it's more useful than having it sitting in Dublin/Amsterdam/some other tax haven collecting dust
 
:P
 
@bwoebi It gets crazy close though
> Apple has more than $215 billion reserved, but Chief Executive Tim Cook isn’t stuffing his couch cushions with cash.
jan 2016
Note that is what they have as spare change
 
@bwoebi oh, true, you are Swedish, I forgot
 
1:32 PM
@ziGi ???
 
:D I am joking again, I know you are Swiss
 
:P
 
if(!strpos($href, '#') && !strpos($href, 'java') && !strpos($href, 'jpg') && !strpos($href, 'jpeg') && !strpos($href, 'png') && !strpos($href, 'tel')){

why does www.test.com#stuff still pass?
 
0
Q: How to preview and download an Image in html

Kavya ShreeHii Everyone, As in gmail attachment process i want to preview/download image as user wish.When i mouse over on any image it will show two buttons like preview and download so that user can either view it or download it for their purpose.I refered so many websites still now i hadnt get exact sol...

 
Vamps do come in pairs
 
1:33 PM
heh
 
yes, Switzerland, it's that country between Norway and the Czech Republic with the yellow and blue flag and speaks Svensk right
 
@TechTreeDev why don't you just put those strings in an array and loop over them
 
@PeeHaa Buy one get one, free!
 
I think they own the eurovision or something
 
@ziGi did this, still no change
 
1:37 PM
mornins
 
@FélixGagnon-Grenier 'nin
 
@TechTreeDev works like a charm 3v4l.org/NhbZ8 maybe your problem is in the $href missing the hashtag
@TechTreeDev btw what do you mean by pass? maybe your logic is wrong, what do you want to do?
 
@ziGi I want to check if the given URL is no anchor, javasript, image, etc.
Oh, well I'm stupid
 
1:50 PM
@TechTreeDev give me a min
 
@ziGi I've already got it. It will ovious fail if I chek with && but it's only an anchor or a jpg
 
@PaulCrovella :( okay.. gonna delete and put another question up then...
 
I just write || instead and do my function in the else clause
 
@Saitama why not edit it?
 
alright, gonna edit dat... :-)
 
1:54 PM
@TechTreeDev 3v4l.org/DUXXm
 
@ziGi Or like this, thanks :)
 
@PaulCrovella the guy who posted the question has a Master in ITC
 
I've no f-ing clue what that means.
 
You mean ICT?
 
2:00 PM
!!google ITC
 
ITC - Faculty of Geo-Information Science and Earth Observation ... ITC is recognized worldwide for achievements in teachin… | ITC - University Library - Scientific Literature on GIS & Remote Sensing ITC Faculty Library is a scientific Library that contri… | ITC - Study - Postgraduate Education Courses in GIS & Remote ... ITC offers a postgraduate educational programme focusin… |
 
!!google ICT
 
ICT - Wikipedia ICT kan verwijzen naar: Informatietechnologie, ook wel … | Informatietechnologie - Wikipedia Informatietechnologie (IT), in Nederland en in België v… | ICT | Vooraanstaande software integrator 29 maart 2016 ... ICT is een vooraanstaande software in… | Search Url
 
!!google y u no speak english
 
Y U NO SPEAK ENGLISH? - Y U No | Meme Generator Y U No. Recaption this image. Upload to imgur. English … | YU NO SPEAK ENGLISH? - Meme Generator Y U No - YOU SPEAK ENGLISH? Y U NO SPEAK ENGLISH ... En… | Y U No Speak English - Y U No | Meme Generator Upload to imgur. English Spanish Russian Other. GENERAT… | Search Url
 
2:04 PM
that's... weird
 
that's... spammy
 
@Jeeves Try adding hl=en to the query.
 
OH NO!!!!! I JUST REALISED PHP DOESN'T HAVE AN &&= OPERATOR! THE LANGUAGE IS INCOMPLETE!!!!!11111
 
@PaulCrovella Information Communication Technology, if you didn't get that already :p Old school way of saying computing
 
2:08 PM
@Andrea ^^
 
@Sean ITC, not ICT
 
@PaulCrovella Ah lol, I'll just go back to my code cave. Scuttles away
 
is there a way to escape those two silly quotes thing ?? =>> ‘Columbus Access request Tool’
 
Intergalactic Toaster Construction
Irritating Terrible Cwestions
 
i am using pdo, it's just removing everything after the first one
 
2:11 PM
hehe
 
Irritating, Typod, Cwestions
 
@Joseph prepared statements?
 
I Taste Cinnamon
 
@Patrick yes, i am using those
 
@Joseph It's a character set problem in your database, nothing to do with using PDO probably (although you do need to set the connection charset to something that can deal with those chars, and make sure you normalise the charset of the input data)
 
2:13 PM
@Joseph do you want me to guess the code you wrote or do you plan to paste it somewhere?
 
@Joseph Yes, annoyingly, half typing a @user name and hitting enter does not autocomplete it, but sends the message :P
 
it is set to UTF8
 
@Joseph what is?
 
$this->dbh->exec("SET CHARACTER SET utf8");
 
OK, well that won't help unless your storage engine is using a multibyte-capable charset, and the input data actually is UTF8
also, there's a DSN attribute for setting the charset which should be prefered over that and SET NAMES
(assuming MySQL)
^ read those
 
@DaveRandom funny enough i have all the above spot on :/
i forgot to mention those characters came from a Microsoft word document ...
 
Then they are unlikely to be UTF8
They are more likely to be UTF-16 or Windows 1252
You should inspect the byte data directly and verify that they are valid UTF8 sequences
And check the character set of the column where you are trying to store them can actually represent those codepoints
 
But i don't want that, i want all my data to be utf8, can i convert those ?
 
Yes you can, but not until you know what you are converting it from ;-)
 
and why does it work when inserting directly via phpmyadmin
 
!!docs iconv
 
[ iconv ] iconv book
 
OpenSSL vulns
some of them are quite stupid
 
ugh, stupid manual
 
Hm. Do switches not like being executed over multiple php blocks?
 
2:23 PM
@Sean elaborate?
You can't do as much in PHP with switch as you can in C, it's considered to be a loop structure so you can't jump in and out of it, if that's what you mean
 
@tereško careful. It might not apply to you, but when I loop Bach's music for too long I start being really nostalgic / way too occupied by my thoughts. Sometimes though, I feel empowered. Not sure what to think..
 
@DaveRandom and i presume there is some php library to auto detect those ?
 
@DaveRandom Nah, I mean across multiple <?php ?> blocks. Here's an example
 
@Joseph Auto-detecting charsets is hard, often impossible. There's a lot of crossover between various charsets (e.g. you have a string made up entirely of ASCII you could also call it UTF8)
 
Replacing case '..'; with case '..': also doesn't work, but no biggie it was just for some quick outputting.
 
2:26 PM
The good news is that if you are pulling data out of a word doc it will be in a known charset, I just don't know what it is off the top of my head
Probably 1252
 
!!wotd
 
snuggery: a comfortable or cozy room.
 
@FélixGagnon-Grenier I needed some "thinking music", while I am working
 
I feel more comfortable just seeing that word.
 
@DaveRandom well, it's a coma separated file that was generated from a word
 
2:29 PM
 
Snugger Off
 
You can't have any output between the switch and the first case (because this makes no sense)
 
@DaveRandom can i find out with what it have been encoded, should i look in the csv file or the source word doc, does the conversion change encoding ?
 
@DaveRandom Aha! Fair enough. Thanks!
 
@Joseph This is tricky. Where did you get the CSV file from? Is it from a file upload?
 
2:33 PM
@DaveRandom no, i had it generated from a Microsoft word doc 2011
 
I'd suggest something like mb_detect_encoding($csvData, ['ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16', 'Windows-1252'], true) and if you don't get a hit in there then reject the data
!!docs mbstring
 
[ Multibyte String ] Multibyte String book
 
(for ref)
That's a small set of the most likely charsets that should be detectable-ish
 
@DaveRandom i don't really mind, it's a one shot thing, i am just running a script to import those and that's it.
@DaveRandom maybe i can detect them and replace them with another char before insertion ?
@DaveRandom but that brings us back to the same problem, detecting them meaning knowing their char set right ? :s
 
@Joseph Oh right, then just inspect the byte data and work out what it is and php.net/manual/en/function.mb-convert-encoding.php to UTF8
@Joseph Yes but you should be able to work this out pretty simply by just looking at a hex dump of the data
 
2:39 PM
@DaveRandom I recommend not using this. If you happen to get the correct results it'll only be by coincidence.
 
Go find any bytes with a value >127 and look at those, you should be able to find a byte sequence->char mapping online pretty easily
@PaulCrovella I also recommend not using this. But I am also aware of nothing better if you have that problem.
The actual solution to the problem is to make your users give you sane data, and make them tell you what it is
 
it's not just that there's nothing better, it's at best a placebo
 
@PaulCrovella and they really are a terrible band
 
@tereško if you don't already, you may find glen gould's goldberg variations pretty interesting, in that regard
 
@DaveRandom i did the stupid thing, i searched for a similar issue and did what every one warned not to do . And it worked ...
iconv(mb_detect_encoding($line[5], mb_detect_order(), true), "UTF-8", $line[5]);
i guess it's ok if it's a one time thing , is it not ?
 
2:45 PM
If it solves your one time problem then fine. But also aararraargh. :-P
(copy/paste would also solve your one-time problem :-P)
basically what I'm saying is: don't do it again
 
I won't .
Thanks for your time
 
@tereško Barock n' Roll
3
 
Instastar
@Joseph yw
 
My old company did something similar.
 
2:51 PM
string sites = {...} would that not throw up an error?
 
@SergeyTelshevsky That is pretty epic.
 
try but no catch
 
@Sean that's not only legit, it's very useful
Try and do a thing, let the exception bubble but do some cleanup regardless of success/failure
 
Well, I'm part of today's lucky 10000!
 
2:58 PM
@DaveRandom the ident functions don't even exist for a good portion of the encodings
 
@FlorianMargaine nice find
 
@PaulCrovella I'm not disagreeing with you
 
including 2 of the ones you recommended
 
@Jeeves this sounds like it would be some neologism but it's a nice one
@Joseph do you know what language/region it was generated in?
if it's Western Europe or North America it should be either Windows-1252 or UTF-8
possibly UTF-16 but I'd think that's unlikely
 
mornigns
wow linkedin in really fucking up atm
 
3:10 PM
always*
 
heh, nah just really today lots of 502's, token mismatches, been logged into a null account and etc
just now it served me the login-submit as a file instead of a action
 
tunnel connection failed
 
> Well played sir but keep an eye on bright_future because it's deprecated, it's now called real_bright_future
That's just awesome
 
I like how everyone blames PHP for that without realizing it's directly from the mysql api
 
3:19 PM
@PaulCrovella It's PHP's fault.
(I don't know what is, but it's PHP's fault)
 
Everything is PHP's fault
Cloudy outside? Thanks PHP.
 
The mysql api changed? It couldn't do some sort of version detection underneath? (I mean, probably just use PDO anyway)
 
@MattPrelude Hey, we told the dinosaurs to stop using PHP 4.4. But did they listen? Now look at them...
 
@AnmolRaghuvanshiVersion2.0 yea, I think some debugging or release fucked up shortly.. I managed to sniff a fun url or two from their backend while it happend
 
@Machavity With "them" you mean all the scammers that fully control any PHP4 server that is still in production, yes?
 
3:25 PM
@KevinMGranger dev.mysql.com/doc/refman/5.7/en/mysql-real-escape-string.html it's the actual name of the function
 
@Oldskool I actually found a server in the wild still running PHP 4.1. Probably CentOS 3 based on Apache 1.3. They had a SHA1 SSL certificate and still had SSLv2 turned on
 
@Machavity "If it works, it works!"
Must be the motto of the guys running that.
But seriously, any data on such a server should be considered severely compromoised, sold and abused in any possible way.
 
@Oldskool More likely: "It works, and 87% of the company's money goes through that, so I need to wait for someone with huge titanium balls to make any sort of change to that"
 
@MadaraUchiha That's never an excuse. Even if such a server is the livelyhood of your company, you can always setup a new server beside it with new stuff and keep testing it until everything works as it should. Any migration is possible, you just need to task someone with actually doing it.
 
@Oldskool Someone must have yelled at them as some point. I went back and they had finally turned off SSL 2. Still using Apache 1.3, tho, so I don't think they can do TLS
 
3:28 PM
@Oldskool Yes, which is why we still have PHP 5.2 installed on some servers.
 
@MadaraUchiha (and not expect it to be done in a few days, give it serious time)
 
@PaulCrovella and it's backwards-incompatible?
 
@MadaraUchiha php.net/eol.php ... you're just 5 years overdue for an upgrade, but whatever :)
The guys from @Machavity 's little gem server are just 14 years late.
So it can always be worse ;-)
 
@KevinMGranger I'm not sure what you mean. It exists because there was a bug in mysql_escape_string and they couldn't change it without breaking bc.
 
We're mostly 5.6 and 7 but the "it works dont touch it" applications are still on 5.3 :(
 
3:34 PM
sure PHP 5 "works" ... it also burns resources for no good reason, which burns money, which burns everything, but ... it works ...
 
@bwoebi can I all() a set of generator instances?
 
@JoeWatkins Well, upgrading to 7 costs time = money = burning money as well.
 
@DaveRandom nope … you have to Amp\all(array_map('Amp\resolve', $gens))
 
@Oldskool you should get that back, very quickly ...
 
Of course it's for a good cause and over time will turn into a profit, but a lot of companies aren't really seeing that.
 
3:36 PM
@bwoebi What does the second argument to all() do?
 
@MattPrelude beats java 1.4, which still powers one of those "it works don't touch it" applications that I sometimes had to touch :(
 
I tried reading it but I don't get it...
 
@DaveRandom there's no second arg?
function all(array $promises) ??
 
@bwoebi yeh... I totally read the wrong function def :-S
 
lol
 
3:38 PM
k, I'll just crawl back under my rock
 
php -n -dextension=modules/vector.so -r 'var_dump(new Vector3(2, 4, 8) * 2.5);'
object(Vector3)#2 (3) {
  ["x"]=>
  float(5)
  ["y"]=>
  float(10)
  ["z"]=>
  float(20)
}
first attempt at operator overloading, success!
 
@JoeWatkins Analyzing the benchmarks, I get the feeling that we're actually loosing a lot of time with idling during due to data fetches… (data dependencies)
 
Proposal: implicitly add a semicolon to php -r if there's only one statement.
 
and some ops are more prone to stalls then others…
 
3:41 PM
@MadaraUchiha maybe psysh.org
 
@RonniSkansing I don't want to install another dependency.
Beats the purpose.
 
Yea I can appreciate that
Feel the same way
 
TBH, I'd expect php -r with no further argument to open some sort of REPL
That would be ideal.
 
but you have so many unnecessary dependencies already.. one more wont hurt ;)
 
and it would be nice with a pimped up php cli
oh if only I had a trillion man hours to lean sufficent C to dig in the zend and learn the source, but it is just soo time consuming
 
3:45 PM
@MadaraUchiha there is php -a
 
@bwoebi What does that do?
 
@MadaraUchiha what you expected that php -r does…
 
@bwoebi tnx, makes sense now. Might be nice to have all() and co automagically promisify Generator instances
 
@bwoebi Hmm
Looks close enough
 
@DaveRandom The basic problem there is that all() currently yields non-Promises back as they were passed
 
3:48 PM
php -a kind of sucks, it's behaviour changes depending on extensions installed
 
@DaveRandom so, it's a BC break, technically…
@Leigh readline/libedit?
 
Aye
 
yea, meh
feel free to fix ^^
I should just reply "fff" (for "feel free fixing") and nobody will understand^^
 
@bwoebi Yeh I saw that. I'd be surprised if that would break anyone's code but maybe it would... maybe if it were possible to extend Generator? Like function foo(): AsyncRoutine { yield; } would give you an AsyncRoutine if it extends Generator?
</things-that-wont-happen>
 
@DaveRandom had that thought already, but stored in things_that_wont_happen, yeah
 
3:54 PM
\o/ almost semi freiday
 
@MadaraUchiha I have this full-of-bugs-and-untested thing... github.com/php/php-src/compare/master...ralt:patch-1
(I never free, and I'm not even sure I need to malloc...)
 
My C is worse than my Common Lisp, so, cool story bro :P
 
Is there ever any point in checking for a failed malloc()?
At that point you probably have bigger fish to fry
 
nice… I consumed 2^64 cycles in few seconds … stupid integer overflow :-D
 
@DaveRandom So, You Only Malloc Once(YOMO)?
 
3:59 PM
Also known as homo
 
He only mallocs once
 

« first day (2026 days earlier)      last day (2936 days later) »