« first day (1870 days earlier)      last day (3061 days later) » 

12:00 AM
@bwoebi >userland
 
?
 
I mean for this to even be useful, it has to affect internals arrays too
json_decode is not userland ^^
 
it is, for our purposes.
if you throw an error in json_decode, well, we end up with some half-filled array, then throw the error and the half-filled array is released again without ever creating any harm by its incompleteness.
 
inb4 json_decode must never throw exception argument.
 
well now you have to specify it to be so...
 
12:02 AM
@Danack dealing with it now :-(
sigh
 
@Ocramius are you going to get involved with the annotations 'discussion' in internals?
 
@Andrea we just could have some extra handling in funcs like json_decode where you pass a non-array, to have it return false.
so that it basically internally catches the exception and returns false.
 
@Danack no, we have a working userland approach that is stable, I couldn't give less of a damn right now
 
so we have hashdos protection in some places but not others
ehhhh
I mean if we're doing that we could just add it only to JSON
 
@Ocramius Also, that Guilherme guy, could really do with like a holiday or something.
 
12:03 AM
I've suggested that before
 
@Andrea we have it everywhere, as it's directly in zend_hash.c
 
@Danack yes, but he's a workaholic
 
it's just special handling in JSON to not throw an exception.
 
no but this is off-topic uh
 
I was at his place while at #TrueNorthPHP, and he's just over-worked on every front
 
12:04 AM
4 mins ago, by bwoebi
I might be wrong, but I currently can't imagine any case where having an insertion fail on an userland controlled array is going to have negative impact… @NikiC ?
 
but that's how crazy brazilians work...
 
@Ocramius those type of people need to be forced to take a break. Try removing his commit permisssions?
 
> userland controlled array
this hashdos protection could mess up internals stuff
 
@Danack we need him for Doctrine2: he's awesome :)
 
@Andrea well, the core internals stuff not influenced by any userland, will never hit these limits anyway.
 
12:05 AM
@bwoebi uh, no?
we have tons of internal functions
the entirety of /ext
are we going to go through and mark things as needing hashdos protection?
 
like function tables… a dev could well, craft code to have it not fit into the function hashtable, but that's the dev trying to explictly segfault PHP… just like he could with __clone() recursion or similar.
 
that's all very well but it's not the problem case
 
@Andrea The only funcs needing care are those which should internally catch the Error.
 
they all need to handle it somehow.
all of them.
an example I can think of is the SAPIs
 
@Ocramius there is one thing that might be worth re-iterating (if you agree with it); one person, who imho is being a bit silly, is arguing that any implementation done by PHP core, ought to be backwards compatible with the current docblock based annotations that apps have implemented. Having yourself say "'eff that" would shut down at least one distraction...
 
12:08 AM
@Andrea all? nah… they just do nothing special and the error thrown in hash.c is rethrown into the callee frame automatically..
you always throw the error if the limit is reached
 
@bwoebi yes but we don't want to throw an error, we want to throw an exception
 
@Andrea I meant Error class, not E_ERROR.
 
In totally unrelated news, if anyone has a gif that represents someone thread-shitting, whilst saying "I R HELPING" I have had multiple occasions to use one recently.
 
@bwoebi okay but that requires returning
which could break stuff
 
@Danack didn't follow the thread. Can you rephrase that sentence of yours? I didn't understand the "ought" part
 
12:10 AM
@Andrea no…?
 
(language barrier)
 
@Andrea an exception was thrown, so the return value is invalidated.
 
@bwoebi it's an internal function, to throw the exception we'll have to hand back to the caller
 
@Ocramius They are saying that any new implementation done in core, for PHP 7.1, ought to be able to read any/all of the current implementations done via docblocks that currently exist in user-land. I do not like that idea.
 
@Andrea well, that's not an issue… control will be handed back at the end of the function anyway.
 
12:12 AM
@Danack so basically moving doctrine/annotations to core?
 
no, it's an issue because the caller may assume the key is added
 
@Ocramius I guess. I don't really follow their argument, as it seems to be leading into a crazy place.
 
@Andrea And I'm telling you this isn't an issue, because the only places where we assume this is where the arrays keys aren't userland controlled.
 
@Danack we already have this, it's called Reflection :p
@bwoebi how do you know that?
 
@Danack if that's the case, then I dislike it as well. There are multiple implementations of annotations out there, and until PSR-5 comes out, we won't really have anything concrete, unless following applies:
Which currently is doctrine/annotations btw :P
 
12:13 AM
@Andrea sure, there may be a single edge case in some obscure function I've never looked into… but in general, there's no such case I'm aware of.
 
that's a fair point @NikiC
 
@Ocramius I think it's fine for implementations to be a standard rather than just interfaces.....
 
We have a lot of clash with docblocks atm, and constantly problems/tradeoffs
implementing annotations in core before solving that is possibly a problem
 
@Ocramius anyway this is the mail. The guy seems to acknowledge that he is at least partly not being productive, and just saying stuff for the sake of it....but still he's distracting from what could be a useful conversation.
 
12:29 AM
I fully get his frustration btw: attempted annotations many times, always turned down by folks that don't even understand why they could be useful.
at this point, I'm also in the "fuck it, we'll do it userland" anyway
 
@Ocramius There was a thread 7 months ago when several 'core' people were talking about annotations, and there seemed to be a reasonable consensus that something would be accepted, so long as it's not docblock based...
 
Yeah, but he (and tbh me too) doesn't have the energy to follow it atm, so his posts there are pure ranting
with indeed no usefulness
 
@bwoebi @Andrea It's not just a matter of whether you get a crash due to changed expectations. It's also about code misbehaving because it does not immediately abort
Unless you explicitly check for a failure you will in all likeliness still execute subsequent operations which are not side-effect free
 
ehm… that's what the exception is for?
 
I'm referring to operations within one internal function
@bwoebi Also, in most cases not handling a failure will lead to a leakage of the inserted value
 
12:43 AM
good point (leak)
 
1:07 AM
do I need to pass a timezone to DateTime if I'm just creating a date?
 
@crypticツ usually better if you don't know the deployment system
 
@Ocramius sorry, I don't understand. =o\
 
@crypticツ if you don't pass a timezone it uses the systems default timezone.
Which might be a bad thing to happen.
 
ah ok, thx guys!
 
1:25 AM
Anyone knows how can I disable case sensitive URL from my server? I 've tried CheckSpelling on in .htaccess but I am getting a Internal Server Error
 
Do you know what is causing the internal server error?
 
Right after I add CheckSpelling on I get the error
 
...I don't mean what action you took, I mean what is the problem that is causing the server to complain.
 
Not really I guess
 
Hey does anybody have any experience here with RAID fanouts? I have 1 RAID card, and I need to add a bunch of disks, how do I do that?
 
1:30 AM
@MenelaosKotsollaris Then you should look in the apache + php log files for the error, rather than try to guess what the problem is.
 
It's just awkward since the one-liner that everyone recommends pops that error..
 
@MenelaosKotsollaris do you have the mod_speling module loaded?
 
I don't think I have, let me check
 
how ironic, httpd.apache.org/docs/2.2/mod/mod_speling.html the module for spelling is misspelled.
 
Okay I entirely miss the httpd.conf which I am supposed to have I think (?)
 
1:44 AM
@MenelaosKotsollaris are you on a shared environent?
 
Yes
Wikipedia suggests that the file should be allocated in etc folder but that's not happening in my case
 
@MenelaosKotsollaris If you're on a shared environment then you don't have access to the server config, which is the only place you can load the module.
You can ask your hosting provider if they can load it.
You should probably read the Apache docs so you know what you can and can not do through .htaccess
 
@NikiC oof, yeah :/
 
Oh Ok my provider is namecheap and I contacted them earlier and the replied negatively but I guessed that they meant that this is my job and not theirs
 
attempting to use wiktionary api. How should search term be encoded for two part word definitions. "Beach' vs 'Beach House'
 
1:55 AM
So I guess namecheap doesn't support case non-sensitive URL
 
var queryTerm = 'beach house';

var queryURL = "https://en.wiktionary.org/w/api.php?" +
"action=query&" +
"prop=revisions&" +
"rvprop=content&" +
"rvexpandtemplates&" +
"format=json&" +
"callback=Wcallback&" +
"indexpageids&" +
"redirects&" +
"titles=" + encodeURIComponent(queryTerm);
this does not seem to work
ive tried _ and + to separate words
 
1
Q: PHP7: Unknown hashing algorithm: sha256

c-toescaIn PHP7, when I hash a string like this: $hash = hash("sha256", "password"); I have this warning: Unknown hashing algorithm: sha256 In PHP 5.2.9, it was working. Is the sha256 deprecated in php7? Other idea? Note: the extension "php_openssl.dll" is enabled.

????
 
@MenelaosKotsollaris why would you want that? /example and /EXAMPLE are two different resources, well at least under Linux.
 
@crypticツ user-friendliness
 
A case non-snensitive URL feels more "hackable" than the restricted one IMHO
But it's not the end of the world that's for sure...
 
2:01 AM
Got it. var queryTerm = 'beach|house';
 
Abe
\o
 
@Andrea would that not create separate resources with the same content? I thought Google dings people for that as it's used to artificially inflate ranking. I dunno, I'm not an expert on SEO.
 
@crypticツ you could do a redirect
 
true
 
Abe
@crypticツ two urls with the same content will just result in two pages with half of the PR
 
2:11 AM
@Abe which is still bad though, right? Since to land on either page would be more difficult since both have only half rank?
 
Abe
yes
solution is <meta canonical> or redirects
 
When you guys have an app which allows users to choose a gender, what do you typically list? (male/female), (male/female/any), (male/female/other), etc?
 
@crypticツ I'd seriously push back on needing gender if at all possible.
 
Abe
lol^
 
@Abe ?
 
2:18 AM
ok, assume the app is for people to sign up to become clothing models. Gender would probably play a role in that. There could be male clothing, female clothing, or unisex. For the model agency their listings wouldsay what gender model they are seeking for that specific line of clothing.
 
Abe
@Danack made me laugh. because also that has became tricky...
 
@crypticツ For that, you don't need their gender, you can just "What types of clothes can you model: males clothes, females clothes, both".
Because their actual gender/identity is not particularly relevant: allure.com/celebrity-trends/2015/…
 
hmm
honestly I don't think the fashion industry has any idea non-male/female people exist
 
@Andrea pretty sure they do: theguardian.com/fashion/2015/aug/19/…
 
no, they're just trans
@crypticツ for now Male/Female/Other is a safe bet. you can't have a completely write-in field as it makes search complicated. you could make other write-in though
can always add options later as needed
though, ugh
I can't think of a completely fair and practical approach for that application
now that I think about it, @Danack's suggestion is better
 
2:28 AM
\o/
 
Abe
user image
5
 
Anonymous
i'm that idiot.
 
Abe
lol
 
Abe
we don't want to offend anyone on purpose but we do. i would use a free field @crypticツ
 
2:32 AM
will do, thanks all
 
@Abe The problem with that is normalising the data.....and/or categorising it......
It's also more difficult to use than a drop down select with 3 items in...
 
Abe
do you actually need categorization? perhaps there is an actual difference with clothes' sizing
 
@Abe You've got a free field form, that is going to get loads of different stuff in it. When someone enters "gay man" as their gender, you need to be able to sort normalise/categorise that into male, so that the agency can filter the model search results by it.....
 
Abe
it's very tricky... :)
 
Or just don't ask such personal questions, and instead just ask "what clothes they look good in".
 
Abe
2:44 AM
yes, that would be a better option probably
took me 3 attempts to write a sort function... sometimes i wonder if i miss some parts of brain
 
One more reason, what clothes people can model would not fall under the "sensitive personal information" bit of the UK's Data Protection Act....and limiting liability for that is a really high priority....
 
Abe
3:05 AM
@Andrea the ping was for something about generics. will ask you tomorrow :P
 
3:37 AM
@Danack The big point would be value semantics.
@ircmaxell That wouldn't really be suitable for value-type collections, would it?
 
3:57 AM
getcomposer.org/doc/04-schema.md#suggest allows me to suggest optional packages. I want to suggest adding Monolog to allow logging for the application. The user can install it so my app would then check to see if it's available and then carry out logging actions. The code may be tied to a specific version of Monolog which was used during development to add the logging feature. How do I enforce that the user installs a supported version if the 'suggest' field has no version constraints?
 
@crypticツ you'd add a "conflict" clause with an exclusive range
{"conflict": {"monolog/monolog": "<1.0|>3.0"}}
 
perfect, thanks!! =o)
 
@crypticツ suggestion: type-hint against PSR-3 rather than monolog itself
 
@Ocramius oh yeah, it's standardized. So typehint against LoggerInterface?
 
Pretty much, yes
Then you can actually just require a logger implementation
lemme see
hmm, no, thought there was a smarter implementation, but there isn't
you can implement an empty logger for your app (takes 3 mins to do), then let the users swap it out if they want to
 
4:14 AM
what about caching? Using doctrine/cache as well. Not sure if it's PSR-6 ready or not since still under review.
 
PSR-6 is not gonna be ready with libs for a while, fwiw
 
so then use the version constraints with 'conflict' until then?
 
hello
 
i am new here
a
 
4:19 AM
o/
 
b
c
hi
guys
anyone here
 
no
4
 
@crypticツ for the PSR, you can just require it and implement an empty logger yourself
pretty much just the interface and all empty methods
 
5:01 AM
morning
 
hey
 
Abe
o/ all
 
5:16 AM
@Abe that's sexual orientation though, that's completely different from gender identity. You can have a transgender man who is still attracted to women for example. So that man would technically choose 'straight' or 'lesbian' even though physical appearance is a women, yet biologically a man.
 
Abe
@crypticツ how about chinese xD
 
it's too complicated to do. I should open a SO question about this and rake in the rep.
 
Abe
yeah, could be a good question to ask
 
@Abe oooh
lol, didn't notice that
 
Abe
5:19 AM
3 hours ago, by Abe
took me 3 attempts to write a sort function... sometimes i wonder if i miss some parts of brain
@Abe u suck. fourth attempt
 
5:48 AM
good morning
 
Could someone help me with CURL?
 
@SuperstarGamer-Trent just ask your question, if someone is around and can help they will =o)
 
Well, I'm trying to send a post request using CURL
I'm doing a simple login program so users can login to their Mojang accounts (I know the protocol, I've done it with Java) but PHP just kind of hates me
Here is my code: pastebin.com/fzcz0ybr
P.S. It's a console applicaiton
Nevermind. It has been solved!.
I had to set "CURLOPT_SSL_VERIFYPEER" to false.
Now I can make that pocketmine plugin :D
 
6:24 AM
@SuperstarGamer-Trent may you be cursed by the MITM
 
The software I am making the addon for, PocketMine-MP, doesn't have the "openssl.dll" installed with it, so I can't use file_get_contents with HTTPS like normal.
And even if I tried to add it to it, it would be a huge inconvenience to my addon users to have to add it themselves.
@Ocramius Oh I just realized that means "Main in the middle attacks" I'll look up to find a way without using CURL, I would probably be hated if I made a plugin that made many users Mojang accounts accessible unintentionally.
 
@SuperstarGamer-Trent eh, you basically need openssl
 
@Ocramius Well, PocketMine-MP doesn't come with that.
It really ticks me off that they would'nt just include all the default PHP dll's. Maybe it was for security reasons. But I mean come on, why not stuff that just add's security features and ease of access for plugin developers?
 
6:39 AM
The extension should actually be there, it just isn't enabled because you'd have to first put the certs somewhere first.
 
@Ocramius It isn't there, PocketMine uses its own custom installation of PHP.
It's really weird and I wish they just did the entire binary, because I'm ready for PHP 7. But because of how they did it they have to reprogram things like the installer or the program will just crash.
 
 
1 hour later…
Abe
7:44 AM
morning v2
 
moin
 
In light of this Meta: meta.stackoverflow.com/questions/262791/… I've been thinking. Do we have a Meta reference for "stupid questions"? I mean, if you come across another one of those "I dont know how to do it, please do it for me" questions, is there some Meta that explains what SO is all about etc you can point to?
 
8:05 AM
Hey guys, anyone know if a wildcard in left-most column of composite index mean remaining columns in index aren't used in index lookup (MySQL)?
0
Q: Does wildcard in left-most column of composite index mean remaining columns in index aren't used in index lookup (MySQL)?

prograhammerImagine you have a primary composite index of last_name,first_name. Then you performed a search of WHERE first_name LIKE 'joh%' AND last_name LIKE 'smi%'. Does the wildcard used in the last_name condition mean that the first_name condition will not be used in further helping MySQL find indexes? ...

 
Abe
8:37 AM
@bwoebi ever considered adding $c = function baz(){ baz(); }; as in js?
 
8:51 AM
I just wrote my first node.js app.
And I am missing PHP already.
 
9:03 AM
Don't want to sound like a bad person, but I sometimes feel Javascript was designed with the main purpose to be different.
 
Yup.
It does feel very different when working with it.
 
I spent half a day yesterday trying to appropriate a js slider. The working solution was to hit it with a hammer (re-arrange the code) until it worked.
And ternary operators make it even more unreadable.
 
The problem is that you need to understand a few concepts in JS.
 
Maybe! The problem is when it's not the thing you want to focus on, but there's an urgent need to fix a thing here and there, it takes way more time than it should. Of course it's possible to learn everything, but it should at least be easily understandable.
Anyway guys, is there some way to do a quick preg_match on an entire array without invoking foreach that I don't know of?
 
Is this a PHP chatroom ?
9
 
Abe
9:33 AM
unless we post memes
 
@ЗахарJoe Actually JavaScript is very similar to many languages
It tooks concepts that were perceived as best from multiple languages
@HassanAlthaf Is that so?
What did you make and why does it make you miss PHP? :)
(Because it had the exact opposite effect on me at the time)
 
Abe
9:50 AM
stop endorsing node.js in the php chat room / hotel pls :D
 
@Abe This is the PHP room?
 
Abe
yes it is
 
This is: Pro Hotel of Pros
 
Abe
personal hotel page
 
Abe
9:56 AM
JS, get a room!
53 secs ago, by Abe
JS, get a room!
7 mins ago, by Abe
stop endorsing node.js in the php chat room / hotel pls :D
:D
 
@Abe happy?
 
Abe
rofl
 
10:25 AM
mornings
 
sup ronni mah man
long time no see
 
yo @HassanAlthaf yea.. whats up
 
not much how about u
 
10:40 AM
@HassanAlthaf Get out
/me reads next sentence - Welcome back :D
 
Abe
:D
yo jimbo o/
 
@Jimbo What happened? Btw, I'm learning Node.js to extend my skills, not to completely switch. Never quitting PHP. :)
 
mornin'
 
@tereško morning
 
10:55 AM
not much with me.. work, code when not working or chill with gf =)
morning @tereško
 
11:22 AM
@HassanAlthaf Never say never. I'll make a believer out of you :D
 
Wait believer?
:p
What's that?
@MadaraUchiha Btw does anyone watch Pokemon and Beyblade still?
 
@HassanAlthaf I still follow Pokemon (very) loosely
The plot of the anime is somewhat converging with the games for the first time
Beyblade, does it still exist?
 
hey @MadaraUchiha, congrats on the mod position =)
 
@MadaraUchiha I did see it a few times on Cartoon Network or Pogo recently. Not sure which Channel. I think both are dead on the site.
Bakugan was awesome. :)
 
@RonniSkansing Thanks
 
11:30 AM
oh yh grats on mod @MadaraUchiha
Ever since we have this DishTV,
(2005).
I have only liked
Grand Sazers, Bakugan, Beyblade, Pokemon, Doraemon, Kiteretsu and Power Ranges SPD.
Shinchan and Kochikame as well^
lol
 
@HassanAlthaf you watch any real anime too, or just CN stuff? :P
 
I used to watch all those.
 
Even Naruto is "real" anime when compared to Bakugan or Beyblade :P
 
Never really liked Naruto. :/
It puzzled me all the time.
Timings weren't okay with me either. I had classes at the time it was broadcasted. xD
 
@tereško Like always I have a JS question, I asked it in the JavaScript-room and (I'm embarrassed for telling that anymore) please if you have some free time, take a look at it. Beforehand thanks
 
11:36 AM
@Shafizadeh You can.
Just do:
 
@Shafizadeh You shouldn't be embarrassed to ask for help.
 
var jsonString = '{"name":"Shafiz"}';
Let's say thats your JSON.
 
Especially if you did your best and still couldn't reach a conclusion.
 
var array = [];
array.push(jsonString);
JSON is just a String in JS.
array[0] therefore will give you: '{"name":"Shafiz"}'
@Shafizadeh Is that what you wanted?
I'm off for now. ;]
 
@MadaraUchiha I happy to hear that, your culture is great.
@HassanAlthaf please wait for 1 min
@HassanAlthaf using push is fine for me? because I want to retrieve them again
 
11:42 AM
@Shafizadeh Understand that JSON is just a normal string like "Hello world" in JS. All you are doing is this in PHP:
array.push(jsonString); == $array[] = $jsonString; in PHP.
If you want persistent storage, then you can create a file, and put the contents inside it, and keep it.
For that you can check out this:
It's for node.js
But I think it might work for normal JS, not sure. Perhaps not, but they might have a ported version.
 
@HassanAlthaf I see, but actually I don't want node.js. I think array.push is fine. tnx
 
Nvm, it is the wrong one.
@Shafizadeh No problem. :)
im off now guys
 
@HassanAlthaf see you soon :)
 
12:07 PM
@JoeWatkins Grats!
 
12:33 PM
You know JS can decode JSON to JavaScript objects and arrays, right?
 
Guys, is there a way to issue $_GET requests in a loop when I have w1, w2, w3,... as parameters? Something like $_GET['w'.$i]
 
Abe
i have so many ideas about generics dayum
@Andrea
so this is a 2-dimensional array of strings
Sequence<string | Sequence<string>>
this is a 3-dimensional array of strings
Sequence<string | Sequence<string | Sequence<string>>>
this is a N-dimensional array of strings
Sequence<string | self>
useful like for post/get data where depth is unknown
thoughts?
 
12:51 PM
@Andrea Yes. Simply with JSON.parse(jsonString);
 
Morning 11ers
 
Supp Peter
 
Abe
\o
 
Huge fucking header
Pieter Hordijk

I'm a huge fucking header, because fuck content that's why.

Very deep text here because that's what websites are about nowadays...
The best content on Earth. :P
 
:-)
 
12:53 PM
I am a PHP developer with a passionate hate for crap. That's my favourite line.
 
Uggggh that entire amp movement gives me a foul taste in the mouth
 
@HassanAlthaf That's an oxymoron
 
@MadaraUchiha Yup. But don't remind me of Literature. It's the thing I hate the most.
 
> AMP HTML embraces the open web, so you can be sure that your content appears correctly across all modern browsers and apps. Pages are published normally to your site, using standard tools, and are accelerated via caches created by Google and others.
Same shit different day
 
@PeeHaa So many keywords
 

« first day (1870 days earlier)      last day (3061 days later) »