« first day (3166 days earlier)      last day (1776 days later) » 
00:00 - 16:0016:00 - 00:00

12:40 AM
knock knock
 
 
3 hours later…
4:00 AM
@StatikStasis no one home
 
4:30 AM
=)
Heading off to bed. nn
 
 
2 hours later…
6:30 AM
\o
 
o/
 
I'm so fragile, I haven't quite managed to sleep off satuday night yet ...
 
so do you even sleep when you go to bed?
 
I can only ever sleep for a few hours at a time, normally 4 hours a night is enough
if I slept for a week, I don't think I'd recover, there was so much alcohol, and noise ...
 
I'm quite the opposite, I sleep ~ 9h every night
 
6:43 AM
I just yawned for like a full minute at the thought of 9 hours sleep ...
 
$subscription = json_decode(file_get_contents('php://input'), true);
 
@JoeWatkins Hehe, so did it make you sleepy or do you think it'd be boring :P
 
I'm just going to very quietly do nothing for as long as I can, until I pass out again ... probably before lunch ...
 
i dont know php. can someone tell me what this line does. i think file_get_content gets data from a file. but i read php://input is used instead of POST, but from where is it getting it
 
so sleepy
php://input is the raw post body
 
6:46 AM
from which url?
 
wut?
 
what the browser posts to the page where you got that code from
 
409
A: What is the difference between POST and GET?

Justin EthierGET and POST are two different types of HTTP requests. According to Wikipedia: GET requests a representation of the specified resource. Note that GET should not be used for operations that cause side-effects, such as using it for taking actions in web applications. One reason for this is tha...

 
i get it..i thought he is fetching data from a file he stored in his file system. does it read the request's body
 
6:56 AM
correct
 
ok thanks
 
morns
 
7:27 AM
wow
something really weird is happening
i am getting the pings on both accounts, regardless of the used handle
 
that's expected ...
wait
 
mornin
 
I think I have a vague memory of something like that coming up before, but could be wrong about that ...
\o
 
7:44 AM
aaaaaah, now i get it, @wes covers both the accounts, exactly like @joe does
useful tho :B
 
8:00 AM
flounce to move with exaggerated jerky or bouncy motions
 
I'd like to use the time waiting for my meeting attendees to tell you guys how awesome it is what this room has grown into. And even though you never manage to do a full page of \o, you are doing PHP a great service. Thanks! <3
11
 
8:23 AM
\o
Yes! I've found myself a way to avoid PHP sessions and still have a stateful sessions in Postgres :)
 
o/
 
8:42 AM
Hi there. why don't parameter type hints work on return by reference? 3v4l.org/jK3u1 (I mean obviously they don't work, just curious)
 
@hakre What would you expect/need with that 3v4l snippet?
 
8:58 AM
Yo, I vaguely remember an excellent article about hashing passwords and explaining the various attack vectors (rainbow tables, brute force, etc.), it has a relatively provocative title, something like "You don't know passwords" or something like that. Does anyone have any idea what I'm talking about and happen to know where I can find it?
 
No.. sorry. It's not in the manual is it? There's a linked article but nothing ground breaking afaik.
 
ThW
Morning
 
cmb
@hakre, parameter types are only checked on function entry, AFAIK.
 
@Gordon suckup
 
9:10 AM
I usually peek at some cheat sheets and when I don't know anything else, I just read the ISO 27k series, the Information Security Stack Exchange, or the national cyber security recommendations.
 
@Jimbo if I was a suckup I wouldnt call you out for using yaml ;)
 
about return types.. this code surprised me: <?php function getInt() : int {return 3.14;} print getInt();
 
@Gordon I still haven't gotten that YAML t-shirt
Could only find this shitty one
 
XML-RPC mutates immutable objects during encoding – #78173
 
@Jimbo the indentation of your order was broken, so it was never received
 
burn...
 
@Code4R7 Yeah, I'm not looking for resources, I know where to look when I need them, thanks 😃 I'm looking for that particular one for other reasons.
 
@jjok Curiosity died on mars. I'm not sure if it was running Javascript.
 
@Gordon You know what, I've never had this problem. I see Marco had a load of retards complaining on GitHub and it turned out to be their indentation, but I've never once in many years had an indentation problem with YAML
 
@JoeWatkins We never get a clean build :(
 
9:32 AM
@Code4R7 I actually was curious if - as the parameter returns by reference - the return type is checked. Turned out not and wondered a bit about that.
 
@NikiC yeah, it's also ruining my mornings, we have very few fails now though ... we'll get there eventually ...
 
So for the ext/curl/tests/bug48203_multi.phpt test, it looks like stderr is somehow sometimes not redirected
 
Hello. Is it possible when registering new user to insert data in two tables with one to one realtion? For exmaple name email pwd in users table and path to avatar in avatars table and create relation to user id.
 
@hakre I think it should be checked. I don't see any RFC for it yet.
@BlackB0ne you'd need Postgres for that, or MySQL / MariaDB with the InnoDB engine.
 
@Code4R7 I use MySQL with innoDB engine.
 
9:50 AM
@Code4R7 I dunno, I have little experience on the topic per se. Maybe it's fair to search mailing lists first.
 
@NikiC I'm not super familiar with curl code, but I'll have a dig about ... it sounds like an azure problem rather than curl, but I'll try to make sure
 
@cmb Is your opinion that Xdebug's #482 and #484 can be merged now?
 
@JoeWatkins I think it might just be a flushing issue
Hm wait
Now I'm wondering why we don't normally get that debug output...
After all, as the error says, we reset the stream to stderr
 
@BlackB0ne great, now you need to have a foreign key relation between your tables and preferrably insert rows in both tables in a transaction.
 
cmb
@derick, yes, IMO both are good to be merged.
 
10:02 AM
perfect
I wonder whether it is still worth to spend all that time on 32bit builds on Windows. What is anybody's opinion on this?
 
@NikiC I hate looking at streams, but the reset code uses "stderr" directly, is that correct ?
 
yeah
But I just realized that this isn't the issue at all
It's just the diff that's shit
All of that debug output is matched by an %A
The actual issue is later
Later, expected output:
Hello World!
Hello World!Hello World!
Hello World!Ok for CURLOPT_FILE
And actual output:
Hello World!
Hello World!
Hello World!Hello World!Ok for CURLOPT_FILE
 
yeah I just spotted it ... once you told me where to look :D
 
So a newline is not where it is supposed to be
 
Is it possible to insert all data into one virtual table and then distribute into different real tables? Using PHP and prepared statements.
 
10:17 AM
@NikiC is it because it's doing two requests with multi and it can't possible tell in what order they are going to respond ?
 
does anyone know about a CS-fixer or similar that is able to remove @method annotations if they are superfluous b/c a developer in the past did add @method annotations albeit the class implements an interface that has the method definition?
 
Hello World! # ch1 line 1
Hello World! # ch2 line 1
Hello World! (#ch2 line 2) Hello World! ( #ch 1 line 2 ) Ok for CURLOPT_FILE
I think that's what we're seeing
I vote wonky test ...
 
@JoeWatkins Yeah, I think that's it
@JoeWatkins Maybe catch output with ob and discard it?
 
yeah, it's the warnings we're testing for
ob will catch those too, right ? so maybe a preg_match on ob ?
I'm not sure where they are raised
it's the call to curl_multi_exec
 
Its no big deal and Im taking another route but Im wondering; Why doesnt this work?
$phpVar .= 'Brown Dog Jumped Over the Fence'. if(this is true) {do this}{else{do that}.'then laid down';
i Know it doesnt work
but dont know why
 
10:29 AM
@JoeWatkins hm...
@JoeWatkins Eh let's just stick another %A in there
%AOk for CURLOPT_FILE
 
yeah that'll work
 
@BlackB0ne I don't think MySQL supports virtual tables, but you can create a temporary table with the Memory engine and use that as some kind of virtual table
 
@Stuart
<?php
$var = "Stuart is too " . (true ? "fast" : "slow") . " to lash out";

var_dump($var);

printf("Stuart should %s the documentation on formatted strings\n",
       (true) ? "read" : "ignore");
?>
:)
 
LOL true story and my apologies on everything
Thanks
 
10:43 AM
I guess it could be done with terenary operators like you showed but for now I just moved my if else outside of that var
Thanks again
 
Good Morning!
 
When I deploy my site, new MySQL tables are created and data populated in some of them (Doctrine migrations). The "products" table has a field "updated_by" and users can update products and their "user_id" is stored in this field. This field is NOT NULL because really if someone updates a product it should have their ID.
The problem is on initial deployment there are no users to save an ID to the "updated_by". This means I can't have a foreign key on updated_by as there are no users in the user table to map an ID to, OR I can't have it NOT NULL. Any suggestions?
 
@James why do you want to set an updated_by when running a migration?
where would the info come from?
 
I dont, I want to add a product row
so product = shoes, created_at 2019...etc. The "updated_by" is because users can edit. This probs seems like a case for a new table - it's not actually "products" but cant talk about the actual thing, and the table only has 4 columns - it's something users can update but on initial launch it needs initial data in there.
 
11:01 AM
Same question, where would the info come from if you don't want it to be null?
 
well that's my exact problem. at the point of initial data there is no updated_by user, and no users, there will be later. maybe a more close example would be better, this just smells like it needs a new table
the initial data is there because that data is public so is needed to show in the website at the time of going live. It could be like that for days, then at some point a user could update it to show a different status based on circumstances.
 
It sounds like just using null is the right choice here.
If the data is there but not touched by a user, then it's null. After a user has updated it, it's not null.
Whether that's actually a column on that table, or a seperate table depends partly on what you're doing.
What other info would be stored along side the 'updated_by' bit of info?
 
trying to think of a useful example...
you know what, I'll drop the NOT NULL. it's not worth the effort :) thanks anyway
 
np, that's what I was getting at.....you hadn't said why it shouldn't be null...
it's only when other info needs to be stored with it (or you need a history of it ) that you'll need a separate table.
 
11:17 AM
I have a Daily Read list that I go through of various tech sites. Some are regularly updated sites/blogs and some are not updated but every couple months. Curious if anyone has any other suggestions from their own list of sites you peruse regularly. (Not counting Reddit) The ones I check daily currently are: Ars Technica, TechCrunch, Engadget, Wired, Tom's Hardware, The Verge, Toptal Blog, ReadWrite, Fossbytes, and Coding Horror.
 
well ideally it would be NOT NULL as after the initial data is entered (migration) for live data at launch time, later on when a user updates it their user_id SHOULD be in there. (not null). meh
 
does anybody know if postgres will pick up a new tls private key when the configuration is reloaded, or does postgres need to be restarted (like when it is needed to restart postgres whenever the location of the private key changes)
 
@James so how would you store entities on creation, without being updated ? You're gonna need NULL
 
yes that was my issue, needs NULL but really it should be NOT NULL
 
@Sjon Thanks Sjon. I will check these out.
 
11:29 AM
mornings o/
 
o/
 
I decided to add an initial admin user on migration point, they are the ones who are logged as updating it at the start, then after that it's whoever actually updated it.
I probably shouldn't have access to databases :D
 
@Gordon I wonder why we never make it to a full page... =p chat.stackoverflow.com/transcript/11?m=44663313#44663313
 
(see what I did there...)
 
11:30 AM
@Code4R7: RTFM... "The files server.key, [...] are only examined during server start"
 
No I have not. Looking at it now.
 
@StatikStasis can you make a mental note to ask yourself, after reading the book, how much does it cost to read those sites daily, and what better decisions have you been able to make with the knowledge gained from reading them.
 
@Danack I'm trying to procrastinate usually. =p
 
@StatikStasis it's not my fault. In the beginning I have waited. For many hours I kept silent waiting for the wave to continue… but it didn't. I no longer stay silent, but I do shed a tear each time I have to break your combos.
 
11:45 AM
=)
@Danack I have some extra Audible credits- would you say it's a good audio book?
 
I have never listened to a book, so probably not the right person to ask. But probably not. Some points you'll need to stop and think.
 
Yeah- some do not make good audio books. I spend a good bit of time driving each day so audio books allow me to go through more books using that format. But others are much better when reading. Some audio books are marred by a horrible narrator.
 
12:18 PM
hello
 
Wes
has someone ever tried phpstorm plugin development here?
 
yes, briefly
 
hey, happy belated father's day :)
 
Wes
do you happen to know if it's possible to manipulate php files source code while being edited @JoeWatkins ? like add / remove code automatically without getting in the way of the programmer, like losing the caret position?
 
12:36 PM
@Wes it has to be. The code reformatting tools in php storm keep caret position generally.
 
Wes
good point
 
@Danack plus it's Java, so you should be able to just decompile those things and see how they do it @Wes
 
kotlin mostly but....yeah.
 
their docs are not terrible, probably start around here
I never actually got as far as anything useful, just know or did know the basics about getting setup and such ... I see lots of reading documentation in your future ...
 
i'm too lazy to google - does anyone know how the phpstan or psalm integration with phpstorm is going? I think they were going to implement a filewatcher thing...for realtime analysis.
 
12:44 PM
I think psalm is doing this at the moment, there's a ticker open for it, but no movement ...
no movement on phpstan at the moment either ... that's been open for a while ...
 
I really wish PHP had a foundation to pay people to build stuff like that....would provide huge value to the community, but looks very non-trivial to build.
 
can't phpstan have the same sort of language server support that psalm has, and isn't that preferable anyway, because plugins for that exist already ?
that's probably why it's not getting a whole lot of attention, there's already a way to do what they want to do ...
 
@JoeWatkins I'd hope so, I just also was assuming that it would be a lot of boring integration work to get everything hooked up.
 
Preloading segfaults at preload time and at runtime – #78175
 
I'm totally guessing ... intellij plugins are quite a niche thing, and the overlap between php devs and java devs that happen to be fluent in intellij sdk is probably non-existent ...
 
12:59 PM
As a non-phpstorm user, I'm wondering what the USP of phpstorm is compared to Eclipse?
 
That's a little like saying "as a non-driver, what's the USP of a Ferrari compared to my unicycle with a flat tire?"
I did write an intellij plugin once btw @Wes, I don't really "know" anything about it but it was pretty easy to feel your way around
 
Wes
thats good news
 
I'm just asking what it is that phpstorm provides, which makes it worth spending money on. Provided that it's not offered already for free by Eclipse. After all PHP is free, Linux and BSD are free, so I'm wondering why people use a commercial IDE while there are free IDE's available.
 
@Code4R7 it would be hard for anyone to convince you - if you want to know, download the free trial and find out
 
I've tried.. but am not impressed much. It's probably because phpstorm is too advanced for me ;)
 
1:14 PM
you should pick the best tool, regardless of it's price. Price is only a problem if it doesn't save you time in return
 
I agree
 
just having a normal auto-complete was worth it for us
 
well.. Eclipse does that for free
 
I tried running that script at the end
it looks like date is somehow off by one from microtime()???
 
nasty bug... especially because it's 4 years old..
That must be why the Intl extension was added ;)
Some nice music when you're working: youtube.com/watch?v=um4Qei2arnc
 
1:31 PM
@NikiC without the microseconds component in the output you can't tell. If it wakes up 22:01:18.999992 it will still report 22:01:18 (afaik)
 
@DaveRandom See output on last comment though
Microtime already reports a time of X.002 or so, but date() is still in the previous second
I'm probably misunderstanding something here, because that seem really crazy
 
Morgens
 
Goedemorgen
 
@Code4R7 "Find Uses" didn't work last time I used Eclipse. It works in PHPStorm. That was the main reason I switched. Search is one jillion times faster too.
 
I don't fully understand what is happening ... but I can see it happening ...
do this
 
1:45 PM
ok
 
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 3ed320705d..37b91ceb82 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1263,7 +1263,13 @@ static void php_date(INTERNAL_FUNCTION_PARAMETERS, int localtime)
        ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);

        if (ZEND_NUM_ARGS() == 1) {
-               ts = time(NULL);
+        struct timeval tm;
+
+        if (gettimeofday(&tm, NULL) == SUCCESS) {
+            ts = tm.tv_sec;
+        } else {
+                   ts = time(NULL);
now find out why :D
 
@JoeWatkins This fixes it?
 
it appears too
I don't know why
 
oops.. my bad.. bug is 5+ years old..
 
1:49 PM
just add it to the list of really strange things that can happen if you use the wrong clock ... microtime uses gettimeofday, it should be changed most likely to match because this is too surprising ...
 
@NikiC I just landed there :-P
 
@Danack I can confirm that computers were a mistake
10
 
it may not help to change it ... unless we change all uses of time for gettimeofday ...
 
The question on stackoverflow has only 19 upvotes..
 
1:53 PM
given we have functions that require usec, I think we have to change all uses of time for gettimeofday, or ignore/document this strangeness ...
 
@cmb Should we continue to bother with 32-bit windows builds really?
 
@JoeWatkins I guess as long as we don't get test failures we can ignore this?
Well, as we already have @Derick here, we can ask him :P
 
I'm fine with ignoring it, and I wouldn't even know where to document it so it were seen in all possibly applicable cases ...
 
What do you think about replacing time(NULL) with gettimeofday() calls, because the latter compute seconds correctly in edge-cases?
 
there is a performance penalty for using a more accurate clock everywhere btw - which why there is also a less accurate clock
 
2:01 PM
@NikiC sorry what?
 
sure, but don't let the fact that you can measure that overhead trick you into thinking it's acceptable ... the fact that you cannot quantify what it costs to return highly surprising results doesn't mean it's not important, or worth avoiding ...
the fact is they are both syscalls, the overhead of that call dwarfs the difference in what those calls do once in kernel mode, I would be willing to wager ...
 
@NikiC how many uses of time() are there?
about 7 in ext/date
but there are plenty of others in the code base
 
@JoeWatkins they aren't syscalls, they use vdso
 
they show up with strace though
 
2:07 PM
source code reads like they both call gettimeofday, which is a syscall
 
oh my bad, time does syscall as fallback, it does indeed use vdso
correctness > speed
this is quite surprising, I'm okay with ignoring it, but my preference is to fix it ...
and anyway, if gettimeofday is not a syscall anymore, I don't think there's any sense in worrying about what it might cost to do it correctly, is there ? unless I'm missing something ...
 
good morning
 
cmb
@Derick, would it be possible to only have a few jobs for each commit, but still trigger all jobs from time to time?
 
@JoeWatkins I'm in favour of changing it - or rather, to introduce a php_time() function which calls gettimeofday() but acts like "time()" as a PHPAPI in ext/date/php_date.c
@cmb Not sure how
 
2:14 PM
that's what I was thinking of, exactly
 
@cmb Do people still use 32bit windows builds?
 
only those with netbooks
 
cmb
@Derick, I think so. XAMPP ships 64bit builds only for some months.
 
AFAIK they always built their own xdebug DLLs anyway?
 
@NikiC "fixed"
it's not quite what I was looking for, but at least the build won't fail now ...
I can't blame him, it's probably impossible to find out how to do it without paying apple some money
 
2:21 PM
@JoeWatkins did you also point dmitry towards the nts release failures?
 
I didn't yet actually ...
I'll do that now ... unless you're already doing it ?
 
nah
 
cmb
@Derick, either this, or they're using the DLLs from PECL.
 
done
/* {{{ proto false get_magic_quotes_runtime(void)
   Get the current active configuration setting of magic_quotes_runtime */
PHP_FUNCTION(get_magic_quotes_runtime)
{
	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}
	RETURN_FALSE;
}
/* }}} */

/* {{{ proto false get_magic_quotes_gpc(void)
   Get the current active configuration setting of magic_quotes_gpc */
PHP_FUNCTION(get_magic_quotes_gpc)
{
	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}
	RETURN_FALSE;
}
/* }}} */
php 8 ...
someone collect firewood, and make noise ...
@Derick can there be a system without gettimeofday ? (!HAVE_GETTIMEOFDAY)
 
2:36 PM
I think Peter recently removed these checks. Le tme see
 
they kinda look like standard ac checks, but I'm not sure ... the existence of HAVE_GETTIMEOFDAY is news to me ...
 
   SVr4, 4.3BSD.  POSIX.1-2001 describes gettimeofday() but not settimeofday().  POSIX.1-2008 marks gettimeofday() as obsolete, recommending the use of clock_gettime(2) instead.
says the man page
 
2:52 PM
All work and no play makes Jack a dull boy
 
Pie
large companies in my country do not like php. They use Java or .Net for development
I Think its very sad
I asked my manager to start a project in PHP
But he said client does approve use of php for his project
Sometimes I think PHP is underestimated
It is very powwerful language with good number of frameworks
 
@Code4R7 All jacking and no work makes a dull playboy
 
@Pie PHP has a poor reputation from earlier days (see: post), however, a lot of these people who dismiss PHP nowadays haven't tried PHP 7.x, so they haven't seen the improvements that have been made to the language.
they just dismiss it because "oh, it's PHP..."
@Pie I hope you mean libraries and not frameworks.
 
0 days since someone mentioned fractal of bad design
 
@JoeWatkins I did say it as "a post that's no longer valid" :P
 
3:06 PM
@Tiffany people think 2019 that sql injections are a php only topic. It wont change the next 30 years because all the peopple who arent even developers are ranting about php. Without any knowledge in developing...
 
@user3655829 if they think SQL injection is a PHP-only issue, refer them to bobby-tables.com
 
Pie
@Tiffany I was very upset that the client was adamant for usage of java or .Net for his project
 
Tell him that it woll cost the double
 
@Pie you could be a PHP evangelist, if it bothers you that much. Granted, you may push the client away, or it may jeopardize your job, so it depends on if that's a fight worth having
 
Pie
@Tiffany I spent lot of time learning it. I was amazed how much time developer have spent in an open source project. It worth a try.
It is so to use
It is userfriendly
It is free
 
3:12 PM
@Pie "it is so to use"?
 
Pie
Easy
It is so easy to use
 
@Pie arguably, OpenJDK is free, C# is free
 
Pie
Yes, Even google thought java was free
 
@Pie openJDK
not Oracle's Java. Even though OpenJDK is still owned by Oracle, but OpenJDK is open-source.
 
Pie
@Tiffany Yes
 
3:14 PM
so either I misinterpreted what you said, or you misspoke ...
but I need to get my hairs cut
 
3:26 PM
All of them...? oh yeah... all of them.
 
Except that one guy. He knows what he did.
 
@DaveRandom IT'S THE BEST DAY OF THE WEEK!
 
I'm so grumpy today that I can't even be bothered being grumpy
 
Well that's no fun. What's up?
 
I believe the phrase rhymes with "duck trough"
actually I'm dealing with the aftermath of a security breach caused by users who are genuinely stupid
 
3:30 PM
Most seem to be that type of user.
but how did the users cause it?
 
I'm also drafting a document template which I am going to make users sign off when they ask me to do dumb shit so it isn't my fault when it blows up in their face
in this case, the manager at a company insisted that we set all users passwords to the same thing and prevent them from changing them
guess what happened
 
Hmm... while having a record is definitely a good thing to cover your tail, being candid about what they are doing and arguing for the best outcome is better.
@DaveRandom umm... do what now?
 
this woman is dumb as a box of rocks and also incredibly unpleasant to everyone she meets
 
That reminds me of that animated film H@me where the leader says "It's a good thing I made all passwords, password."
 
I told her why it was a bad idea but at the end of the day "the customer is always right"
"the customer is always an absolute bellsprout"
oh no wait the other thing
I probably shouldn't be telling people that in a public forum actually :-P
although she totally deserves to be made an example of
 
3:36 PM
Just call her Alice and it's all fair game :-)
 
@DaveRandom yes I ended a sentence with a preposition, deal with it
@PeeHaa wouldn't even call her an ambulance
 
haha
 
3:52 PM
@DaveRandom had someone come in the office to discuss something so I missed the now removed comment. =(
@PeeHaa Alice is the worst.
 
German sausages are the wurst.
 
@StatikStasis In retrospect it will have to remain a mystery because there is an ongoing criminal investigation :-P
 
Understood.
Off to the gym. See you all in a bit.
 
I'll see you in the gym. brb hacking the CCTV
 
00:00 - 16:0016:00 - 00:00

« first day (3166 days earlier)      last day (1776 days later) »