« first day (2652 days earlier)      last day (2290 days later) » 
00:00 - 16:0016:00 - 23:00

12:00 AM
Goodday everyone
 
Wes
@PaulCrovella i actually recorded myself. omg i suck
 
@pmmaga the only point where we can get control during an identity comparison is upon undefined variable access in the error handler. However it will then always be null, we can't change the value within our error handler anymore.
 
@Wes lemme hear it
 
Wes
no :B
 
everyone hates their own voice if they're not used to hearing it recorded, you're not qualified to judge it. lemme hear it.
 
12:05 AM
@bwoebi I was trying that now :D and reached the same conclusion
 
I hope there's not a PHP Trash room, where babies move messages to it, cause it makes them cry.
lol
Like in Python Room
Is not my fault, I love PHP :v
 
@pmmaga compiled languages could at least fetch their %rip and change the x86 instrs about to be executed
but PHP? no chance, can't change anything at runtime there
so yeah, the only thing possible is $a === null && $a === true - this you can make truthy.
 
Wes
@PaulCrovella you don't want to hear it :B
 
oh but I do
 
12:22 AM
I hate date input fields
 
Wes
also the pretend british accent of bush doesn't sound like i thought it would sound like rofl
so embarrassing
 
Wes
12:35 AM
i wanted to make frank sinatra's my way, ended up with sex pistol's version :(
:B
 
that'll get you killed in some places
 
Wes
12:48 AM
lol
wtf
i'm not sure what's the song about now that i think of it
it's certainly about death in part
the final curtains...
it is quite sad indeed, must be because of that :B
 
 
3 hours later…
3:31 AM
Invalid search and Closest matches function – #75846
 
3:49 AM
hello
good night
 
4:23 AM
morning
 
4:37 AM
Good morning people
 
5:07 AM
WHO DID THIS https://t.co/Eq7q8Txjd0
 
how you all handle auth while doing unit testing api's ?
@SaitamaSama who did that?
 
lol, its just a joke for the missile alert that happened in Hawaii
 
5:24 AM
anybody here ever heard of Ron Funches?
or ever seen Kroll Show?
 
morning
 
5:45 AM
Hello
 
6:09 AM
@samayo you right click on the profile and select the option whisper
sorry @MadaraUchiha went to bed early yesterday, I'll be up for some tonight tho ;-)
 
posted on January 19, 2018

New Cyanide and Happiness Comic

 
6:56 AM
mornings
happy frydai
 
Anonymous
7:13 AM
@SaitamaSama I don't mean how to chat with you, but the difference in speed between regions. You said you get bad pings in EU region and I don't know how to check mine
 
Anonymous
@tereško Yup, forgot to thank you for making me an animes fan
 
Strange behaviour of array_map and call_user_func_array – #75847
 
Anonymous
My friends, family and gf think I might be a little bit retarded, so I guess you are to blame also :p
 
Anonymous
I seriously can't watch animes, buy php elephant, put stickers on my laptop now b/c it's a serious problem now
 
@samayo got to video > advanced ...
there should be some options to enable network stats
@samayo if you need anime recommendation ping me
:b
 
Anonymous
7:25 AM
I have tons lined up already, let me finish those first :)
 
:B k
 
Anonymous
Agrr
 
Anonymous
7:41 AM
wtf!!
 
7:53 AM
lol
 
@IROEGBU I did not fall for that ;-)
 
enfant terrible French. an outrageously outspoken or bold person who says and does indiscreet or irresponsible things.
 
8:31 AM
morning
 
8:47 AM
I'll just leave that here
 
Why is this not working 3v4l.org/1bYJv
4
 
9:04 AM
Hello
I need some help in Magento 2.
 
lol
 
@SaitamaSama But it's awesome.
 
@kelunik :D nice one!
 
9:33 AM
Anyone got any good reasons why this should not be considered a bug? 3v4l.org/osLnh /cc @kelunik @FlorianMargaine @Leigh @pmmaga /reping @bwoebi
@bwoebi again for good measure
@bwoebi
 
For even more fun, decode a with A, and vice versa
 
@DaveRandom I suck with unicode
 
Hello. I need help here please.

https://stackoverflow.com/questions/48337586/oop-get-the-result-from-another-property?noredirect=1#comment83660749_48337586
 
10:06 AM
@DaveRandom If you decode A with a, you can actually see the extra spaces there .
for reference 3v4l.org/MFdit
 
@mega6382 Those aren't spaces
They're nulls
 
$content = "some text here";
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/myText.txt","wb");
fwrite($fp,$content);
fclose($fp);
i need to store my file into cloud server(like Microsoft azure,AWS...) instead of root directory is it possibe! please help me
for example:
$fp = fopen("http://www.myforumn.aws.com/myText.txt","wb");
 
@Leigh Then why are they showing on the screen?
 
@mega6382 Why not?
Wrap it in a bin2hex or something and check for yourself
3v4l probably converts control chars to spaces or something in the output
 
OK
@Leigh That seems more likely.
 
10:14 AM
If I do it locally I get " "
 
The strange part is, my server ip is different than what I ping of my domain name!
 
Is it possible to store into cloud server from another server using php file creation
 
oh hey, so converted it too, anyway I get "non printable char" squares
 
@DaveRandom I'd agree it's a bug because of the inconsistency. But it's not doing so by accident, it's a conscious decision: github.com/php/php-src/blob/… So I'm not sure if there is a strong reason to do so..
 
If I wrap it in bin2hex I get 20, which is a space. Also, on my local machine it converts to space too.
 
10:18 AM
@Leigh not explicitly
 
A directory has 777 permissions
What reason would there be for PHP not to be able to write to it?
 
all kinds of shit
acls, extended attributes
 
the disk is full :P
 
Apart from full disk ;)
Hmm I'll check ACLs
 
getfacl + lsattr
 
10:22 AM
@Leigh cli shows exactly the same result so it's not 3v4l specific, it's PHP
 
always blame php
 
!!blame php
 
$ php -r 'print str_repeat("\0", 10);' | xxd
00000000: 0000 0000 0000 0000 0000                 ..........
maybe web browsers and consoles just show spaces for nulls
 
@Sjon Yes, on my local server it does the same.
@Leigh Or maybe PHP provide the output like that.
 
10:24 AM
$content = "some text here";
$fp = fopen($_SERVER['DOCUMENT_ROOT'] . "/myText.txt","wb");
fwrite($fp,$content);
fclose($fp);
i need to store my file into cloud server(like Microsoft azure,AWS...) instead of root directory is it possibe! please help me
for example:
$fp = fopen("http://www.myforumn.aws.com/myText.txt","wb");
 
my php (as above) does not return actual spaces
 
@hearthacker yes, it's possible. go and read the documentation of the cloud service you want to use.
 
i creating file into one server and want to store into another server using php is it will work?
 
Sure, PHP can do what you want, if you use the right code (you probably want to use a library someone else has already written though)
 
10:28 AM
oh thanks guys for your valuable response but i want to know is there any idea to do that?
 
@Sjon with how much ETH valued in the meanwhile, am I a corporate sponsor now? :D
 
I just linked one
If you have no idea about the various ways to move a file between servers, "trying to do it with PHP" is not the best place to start
@Jimbo any luck?
@Jimbo also don't forget namei -mo /path
might have permissions on the dir itself but not a parent
 
@Leigh can i able to store directly into another cloud server ?
 
via what protocol?
 
during file creation instead of file transfer using cloud
sry i dont know which protocol...!
$tes = "http://mystore.net/awa.com/Demo";
$fp = fopen($tes."/myText.txt","w");
 
10:38 AM
You can securely mount a network fileshare from the remote server and save to that, you can use a protocol wrapper to access the server via ssh, or (yuk) ftp
No, you cannot do that with fopen and http
 
oh okay
 
Or use the cloud service provides SDK and upload using that
Or, write a script on the remote server that allows file uploads, and post it using curl
 
oh thank you leigh
 
0
Q: Using Guzzle's 'sink' to download a file with PHP - wrong character encoding?

JimboI'm using Guzzle 9.x to download a CSV file with the sink request option. $client->request('GET', 'path-to-file', ['sink' => $writeFilePath]); Upon inspection of the file, the results are garbled. I think need to set the encoding somewhere when it writes to a file. The original file is ind...

@Leigh It was a retardation :)
 
10:54 AM
PK = zip file
Give it an unzip and see what you get
@Jimbo
 
@Leigh Hmm when I download it though it's just csv
Dude, you're awesome
It comes back as a csv file, but it's actually zipped
Wankers!
 
That's why I get paid the big bucks
Oh wait...
I made myself sad
 
topkek
 
Does the server respect Accept-Encoding? Would be a bit more sane to get it as csv with gzip over the transport
 
Hmm, probably. So if I put "Accept-Encoding" as a header with gzip, I should get back the actual CSV?
This could be 500MB in the future btw...
Which is faster?
 
11:01 AM
I've got no idea, if you're getting raw CSV in the browser but ZIP via guzzle, I'd suspect something with the http headers is telling it to compress before sending
if you don't accept gzip encoded transfer maybe it's zipping to get it's compression that way
No idea what the service is, so I can only speculate as to why you get two different results
 
@DaveRandom Just fix it instead of spampinning me :-P - Well yea, looks like a bug, bugs like a bug and yels in our face like a bug, so it is a bug
 
Happy Friday folks
 
Happy Caturday \o/
@Sean up for some Overwatch tonight at 6 or 7 pm GMT ?
 
What.. Caturday is tomorrow
Can't tonight dude, sorry. The missus and I are going out for restaurant week
 
:( alright
 
11:10 AM
@Shafizadeh How did you come up with this? What do you mean?
Hello room.
 
Just means there's one or more layers between the public IP and his server I guess? Things like firewalls or load balancers could be doing that
 
@Sean Could be.
 
@Tpojka here is my server ip (195.201.0.150), and when I open it via a browser it works as well, also here is my domain (lamtakam.com), and when I open it via a browser it works and it is the same as mentioned ip. but when I ping that domain, it shows another ip (104.31.74.192)
 
What kind of hosting is there: shared?
 
Wes
11:34 AM
morn
 
mronin
 
@Tpojka VPS
 
@Shafizadeh Shouldn't be, but if it is making you some further issue, my suggestion would be to send mail to support asking them about.
 
Anonymous
Another day, another question from Shafizadeh
 
Anonymous
morning all
 
Anonymous
11:37 AM
 
@Tpojka ok thx
 
@Sean it's just that he doesn't know how to configure his DNS
 
@samayo I am pretending @tereško 's decoy flare. :D @Shafizadeh Np.
 
Morngins
 
11:44 AM
\o
 
o/
 
12:00 PM
@pmmaga OK so basically it turns out the short answer is "because perl" and that essentially you should use Z* for everything other than the very specific scenario that you have a fixed-width null padded string.
I have come to detest perl's pack format
 
Make a better one
 
working on it :-P
 
@pmmaga Haha, unfortunately I spend it as well
 
:P
 
the recent rise is very interesting - I wonder what 2018 brings
 
12:07 PM
@DaveRandom yeah, it started looking like it was trying to make it behave like perl's pack. started looking into the docs but then got distracted by work stuff :P
 
@DaveRandom If you have a truely great idea, we can extension it
 
@pmmaga tl;dr it's all terrible
@Leigh As yet I do not. I'm happy with the object-model approach but that is a bit clunky.
I do like the idea of it being extensible though
 
I meant C ext
 
yes I know
I mean that I like the idea of there being an object model, but also there should be an easier way to write formats as a string
 
->prepare, ->execute
 
12:11 PM
I looked at protobuf, that definitely has potential in terms of the language it uses
the PHP stuff is very much not there though
 
Yea I'm not a fan of it, but it covers the use case very well
 
C (and C-like syntax) is generally well suited to this sort of thing because it's inherently quite close to the underlying memory layouts
 
yep
 
 
1 hour later…
1:24 PM
buenos dias
 
\o
 
o/
 
\o
 
\o/
 
1:27 PM
 
guys, "F**k" stands for "fuck". What does "S**T" stand for?
 
shit
 
oh right, thx
 
@Tiffany iirc tables are a safer layout format for email htmls
 
Can not start php7.2-fpm because 'clear_env' is an unkown entry – #75848
 
1:42 PM
@Tiffany tables4life
 
@SaitamaSama true
 
(int) $this->dbData['display_order'] ?? 0 linted as "suspicious binary operations" wut
Not satisfied until parentheses were added like this: (int) ($this->dbData['display_order'] ?? 0)
 
2:04 PM
@Sean yes, you should always do that because 3v4l.org/7YST9
I always forget how to actually use the words "precedence" and "associativity" with the correct semantics, but basically a cast is always applied to the thing it is immediately next to, if you want to cast the result of an expression you need to wrap the expr in parens
but tbh I'm generally a fan of using parens everywhere
and if, when you do that, you end up with a line that ends with ))))) then it's a sign that you should break the expression up a bit
 
@Tiffany woah, nice :o
he apparently did the dead parade op cover as well youtu.be/id5wEaxOVL0
love that op
here's the japanese one youtu.be/_DwbXmr70C0
 
okay, question, google hasn't been much help and I'm impatient now. Where should I be building PHP from source? Does it matter, or do I need to make it in a specific directory?
 
any directory
 
it doesn't need to be in like /etc or /bin or something?
 
nope
when you do sudo make install, it'd place the compiled binary in /usr/local/bin
 
2:15 PM
...
 
okay
 
@DaveRandom Yo, cheers for clearing that up for me, was a quite confused!
 
after compiling that you'd probably need to create a php.ini or php-cli.ini file in /usr/local/lib
 
alright
there is no php folder in /usr/local/bin...?
 
Wes
hayo
 
2:22 PM
there should be an executable file in there after you've make install'd it
the folder where the ext and stuffs is present in /usr/local/lib/php
 
okay. I'll check it in a bit. I'm doing two things at once right now, and the other thing started going...
 
oh okay :)
 
I'm writing a pattern for validating mobile number, one of conditions is "being 11 digits". Is it true also for mobile numbers in your countries?
 
In my country yes, in every country no
 
@SaitamaSama sorry
 
2:29 PM
np
 
@DaveRandom what about "being at least 11 digits" in all countries?
 
I do a lot of stuff with push notifications, some of it is hardcoded. How to people feel about emojis in strings in source code (rather than the unicode escape sequence )
 
@Shafizadeh also no. If you actually want to verify that a thing is an active mobile phone number you need to use an HLR lookup. But if your service requires a valid contactable mobile number, you should just require an SMS validation before you activate the account, or activate the feature that needs the mobile number for the account.
 
@Leigh I'd rather prefer the latter
 
@SaitamaSama So you'd rather see \u{1f911} than the actual emoji for example?
 
2:31 PM
yes
 
@DaveRandom yes, the SMS validation is also there. But I want to do a validating before doing everything
also another condition is start with 0, is it true in your country?
 
much like email, there's not a lot of point in validating the format of the input (except for pointing out typos at the front end) because it still doesn't tell you whether it's a valid contactable entity
 
because if the font doesn't support that unicode in a ide or something, it'd rather be useful to see the codepoint than seeing a rectangular block
 
@DaveRandom ok, thx
 
@Shafizadeh yes, but not true in many countries e.g. every country that uses the north american numbering system, which is at least the US, canada and mexico
possibly others
 
2:33 PM
:-(
 
There's also at least one western european country that uses 1 as NDD prefix, I forget which
 
please tell me some general conditions which are the same for all countries. i.e. the whole string should be digit
 
just strip non-digits
people write numbers in all kinds of ways
 
hmm, not bad
 
E.164 is an ITU-T recommendation, titled The international public telecommunication numbering plan, that defines a numbering plan for the worldwide public switched telephone network (PSTN) and some other data networks. E.164 defines a general format for international telephone numbers. Plan-conforming numbers are limited to a maximum of 15 digits, excluding the international call prefix. The presentation of a number is usually prefixed with the plus sign (+), indicating that the number includes the country calling code. When dialing, the number must typically be prefixed with the appropriat...
 
2:36 PM
Our phone numbers here can be 13 or 14 digits... Or lesser, or more
 
13 or 14? heh! two different kind of numbers in the same country!
 
however, not every PSTN in the world even conforms to E.164
 
We have 0 in front of every mobile number, if you include country code it's optional.
 
Wes
@Shafizadeh that's like, all countries
 
So, you can put it if you like or not
 
2:37 PM
I decided to put just this condition: "being at least 2 digits"
 
Wes
we got numbers of 1 digit, up to 8, 9... probably more
excluding prefixes
 
@Shafizadeh just don't bother validating it
strip non-digits and give the problem to an external service
 
@DaveRandom yes, sending a SMS is the best choose here
 
@DaveRandom What happens to "+" (being first character)
 
Well you need to know the country code separately in order to talk in a vaguely sane way to any external service
 
2:40 PM
@IROEGBU I thought about it regex101.com/r/yJvfU6/1
 
Country should be a pre-defined list, it's trivial to maintain a list of IDD prefixes for countries, just let people input their mobile number as they would normally write it
 
you europeans with phone numbers with random digits.... what sorcery is this
I'm sheltered and used to my 1.123.456.7890 numbers :P
 
github.com/giggsey/libphonenumber-for-php should be good if validation is absolutely required.
 
@Tiffany NANP is a rare example of people doing something vaguely sensible from fairly early on in the lifecycle of a piece of technology. The rest of the world did all sorts of fucking weird shit for ages
 
How can paging be communicated between the service and the storage? Should the storage interface support paging the data it pulls back?
Actually, think I've got it
 
2:45 PM
@Sean yes. If the storage contains a million records and the service only wants 10 from the middle, you don't want to have to pull down half a million records just to get the data you are interested in.
 
Aye
 
SSO is interesting...
 
Yes, that's the problem with authentication in general. "Interesting" == "easy to fuck up" :-P
 
and/or vunerable to exploit :P
 
@DaveRandom lol, debugging why an SSO application isn't logging out, using SAML/ADFS
engineer I'm working with is using words I'm unfamiliar with, so I'm googling as he goes along, and going "Oh! ...interesting"
 
2:51 PM
so, I have been following the review-feed this week: codereview.stackexchange.com/questions/tagged/…
and the shit that shows up makes me suspect that Laravel is actually used clueless people
2
it's not the ones that just follow the hype, but the people who tend to fail the FizzBuzz in the interviews
 
do people actually use fizzbuzz?
 
@tereško you mean, Petterson's "interview", where he owns the interviewer, that is currently breaking twitter?
 
@FélixGagnon-Grenier yeah, that's the one :D
 
heh, only bits here and there
I very much like this person
 
It's taken me far too long to realise that when a project manager is making unreasonable demands, you can just send unfinished work to QA and it will take them a day or two to send it back and say they can't get it to work.
 
3:06 PM
hmmmmmmm ;)
 
@DaveRandom I used to asked candidates to complete a fizzbuzz method which was run against a test suite, pretty fun
And did have candidates who couldn't do it
 
what's fizzbuzz?
 
!!urban fizzbuzz
 
[ fizzbuzz ] A common programming test used in interviews to check if an applicant is talking out of their butt. Commonly: Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.
 
A stupid unrealistic test of whether you are not a retard
 
3:09 PM
oh
 
Well, I'd fail it. I am a retard. But that's not why I'd fail it
 
I think I've played a fizzbuzz drinking game
 
Unless it's just ($i % 3 === 0)
 
It's a horrible horrible painful test because it's specifically designed to make you write code that is "not clean"
 
That would've been much more fun with code involved...
 
3:11 PM
I mean if you were physically incapable of writing bad code then I'd feel for you
 
I just did it quickly and there is no solution that I don't hate
 
@Jimbo yes, it seems to be. something like this, apparently eval.in/938245
 
It's just a minimum bar test to see if you can code, not whether you can code well
If it's used to judge coding performance or style or standards or anything beyond that, it's not being used well
 
I think 3v4l.org/5P18W is the solution I hate the least
 
ooohh clever
 
3:16 PM
not particularly, but readable
 
well, you get one less condition by not using else
 
I am allergic to else
:-P
 
/me waves
 
Wes
3:23 PM
\o
 
Morning.
 
what is the term for variables that are like: $row1, $row2, $row3 ... $row . $n+1 I know that they should be converted to an array, but what is that behavior called? I thought it was magic numbers, but google doesn't seem to agree.
 
Wes
variable variables? $id = 3; ${"row" + $id} = 123;
 
@Tiffany at least some people would call it mixing data with metadata - slideshare.net/billkarwin/sql-antipatterns-strike-back/…
 
@Wes adding a number to the end of a variable to make it different than a variable with a similar name, e.g. $row1, $row2, $row3, $row4, etc. It's a behavior that seems to be common with newer programmers because they're unfamiliar with or afraid of arrays
 
Wes
3:45 PM
well, it's not always wrong not using arrays. if i don't need enumeration and i only have a few objects, i'm not going to bother creating an array for that
like $point3d = ["x" => 12, "y" => 237, "z" => 298];
$x $y $z would do just fine
if the count is not known then you want to use an array
but if it is, using the local symbol table is not different from using a struct
 
there are times I believe it's valid, yes, but there's a limited amount of variables like that. I'm talking about variables that will go up to like 10 or 15
 
Wes
you package them in case you want to pass them around
 
var1, var2, var3, var4, var5, var6, var7, var8, var9, var10 ... what is that behavior called
 
Wes
i doubt it has a name
dynamic variable declaration maybe?
but that's not even a thing in many languages :B
 
seems too fancy of a term for something that only inexperienced programmers would do
 
Wes
3:50 PM
in php you can do it, e.g.
foreach(... as $i => $x){
     ${"var" . $i} = $x;
}
but php doesn't actually have variable declarations
 
it's an issue that isn't specific to PHP
 
Wes
dunno
 
e.g.
$var1 = 1;
$var2 = 2;
$var3 = 3;
$var4 = 4;
$var5 = 5;
at the start of a file
shrug... I'll ponder it
 
@Wes here's a better example of what I mean: archive.oreilly.com/pub/post/the_worlds_two_worst_variable.html
 
Wes
3:56 PM
again that's not necessarily wrong :B if the number of variables is finite and you don't need to iterate over them, that's not too bad
 
^ that
 
Wes
oh that's just bad naming :D
 
@Tiffany variable variables
(not even joking)
 
Wes
26 mins ago, by Wes
variable variables? $id = 3; ${"row" + $id} = 123;
 
what the panda said
 
00:00 - 16:0016:00 - 23:00

« first day (2652 days earlier)      last day (2290 days later) »