« first day (2963 days earlier)      last day (1992 days later) » 

12:53 AM
I hate password requirements like this: Password must contain 8-30 characters with at least one number and one uppercase character.
My password is four random words generated by my password manager, I added a symbol into one of the words at random, and I uppercased one of the letters at random. Stop making specific requirements and judge my password by meeting at a number of specified criteria, i.e. character length, symbol, uppercase, number. So I have an uppercase character, I have a symbol, and my password is long as fuck... LET ME USE IT!! </rant>
 
 
5 hours later…
6:22 AM
@Tiffany Yes, Artax is the client, while we renamed Aerys to simply http-server. Artax will become http-client.
 
 
2 hours later…
8:00 AM
tsuris Slang. trouble; woe.
 
8:55 AM
DateInterval compare unpredictable result – #77202
 
mornin all
Anyone heard of Mozilla's Web of Things?
I saw they have implemented their API with some languages but not PHP so I was wondering if there is a place to implement it using amphp.
 
9:47 AM
@brzuchal I think I heard about it when they first announced it, but I wasn't really sure where it fits in. Is it like a replacement for Home Assistant?
 
morns
 
@jjok There are two things one is a gateway with ui and voice assistant and second is REST API + WS standard they want to push to others, so connecting Things using their standard should be out-of-the-box and autodiscoverable they also have some implementations of this API in Java, Rust, Python etc.
 
git mergin
 
10:02 AM
@jjok idea behind it as I think is to create a common standard for communication between things using well grounded HTTP with WS
 
@brzuchal Sounds ideal. It doesn't really look like any other companies are involved, other than Mozilla though.
 
> The Web of Things is not just a Mozilla Initiative, there is already a well established Web of Things community and related standardization efforts at the IETF, W3C, OCF and OGC. Mozilla plans to be a participant in this community to help define new web standards and promote best practices around privacy, security and interoperability.
 
10:26 AM
I was looking also at OpenHAB nice project and was trying to find some connection engine for Mozillas WoT without any luck. But if they would be able to spread the idea of common API connecting other vendor systems should be trivial.
BTW I'll try to make the same in PHP using amp
2
I mean their API for Thing server using amp
 
10:45 AM
Do I need to send csrf or passport token or both together in headers while making an API request ?
 
mysqlnd.net_read_timeout CAN be changed via PHP_INI_PERDIR – #77203
 
I know if its using form we need to use csrf token with the form but I am not sure if to send csrf with header as well
 
morni
 
I am using laravel passport for authentication
 
11:02 AM
my condolences to your parents
 
!!rfcs
 
There are no RFCs in voting. Sorry, but we can't have nice things.
 
anyone here for my question please ?
 
\o
 
11:27 AM
o/
 
11:58 AM
\o
 
12:39 PM
o/
 
12:49 PM
\o
 
I apologize for interrupting yet another pathetic attempt at a wave chain. But this is more important:
php -r "echo str_rot13('png');" gives "cat". That's proof images on the web are for cats.
5
 
php -r "echo str_rot13('png');" gives "cat". That's proof images on the web are for cats.
 
1:15 PM
@Jeeves What does the rot8000 says?
@Andrea You could pretty much get away with murder if you sumimasen enough.
 
1:29 PM
@MadaraUchiha 申し訳ございません
 
Hello, I’m trying to get a scalar value as input.. is there a special type which I can use in the zend_parse_method_parameters which I can use or should I collect it as zval and then manually check the types boolean, long, double and string
 
@JAamish as zval, yes
there's nothing for scalar specifically
 
@NikiC thanks!
 
2:00 PM
0
Q: How to print out a check-mark icon on submitted form using PHP?

NatalieThis code below will print out a <i class="far fa-star"></i> if the rowCount == 0 and if > 0 will print out <i class="fas fa-check"></i>, after the user submits the form they will not be able to see the <i class="fas fa-check"></i> unless they refresh the page, after the user submits the form the...

could someone help?
 
2:15 PM
getimagesize(): Read error! should mention file path – #77204
 
2:44 PM
How to decode json request body in AMP inside RequestHandler?
 
3:04 PM
@Gordon You're a monster.
 
o/
 
3:17 PM
Moengins
 
@StatikStasis that's what Rihanna says
 
morning
 
o/
 
Payter!
\o
I fixed my motorcycle yesterday. Normally I wouldn't term changing the battery as a "fix", but given how complicated Harley-Davidson decided to make accessing the battery on this bike, I'm sticking with it
 
:)
 
3:31 PM
posted on November 26, 2018 by CommitStrip

 
@Dereleased heh, it's easy on my Ural. What HD do you have?
 
Street 750
Remove seat, undo 7 wiring harnesses, disconnect capacitor from frame, remove plastic sheet, undo terminals, remove side panel, undo 3 more wiring harnesses, remove plastic sheet that has fuse box on it, shimmy battery out, put in new battery, perform all the previous steps in reverse
 
> Andrea Faulds: Professional PHP6 (Wrox Programmer to... and more items for you.
thanks amazon
i should convince some publisher to let me write a book about php 8
 
Lee
4:06 PM
Hello, any magento devs here?
 
4:20 PM
Morning.
 
@Andrea PHP Infinity: The Definitive Guide
Thank me later.
Alternatively: PHP One
 
so, @samayo, what did you pick up? (the sale ends tomorrow)
@MadaraUchiha if I write a book on PHP, I will name it "PHP: Mistakes Were Made"
 
> POOP: PHP OOP For Dummies
 
Any feedback on my variance RFC before I message internals?
 
... it's me, so it would probably would end with ".. for the Stupid"
 
4:37 PM
I need to dig more into crazy traits stuff as per Nikita's recommendation, but I think that can be done while it is under discussion.
 
@LeviMorrison That second example is not necessarily typesafe
covariance vs contravariance and stuff
 
@MadaraUchiha Which? Will you copy it here?
 
interface X {
  function m(Y $z): X;
}
interface Y extends X {
  // not permitted but type-safe
  function m(X $z): Y;
}
 
Parameter goes from specific type to a more general parent. That's contravariance and safe. The return type goes from a general type to a more specific subtype. That's covariance and safe. Correct?
 
I'm not sure. I can never remember which is safe in which context
 
4:42 PM
@LeviMorrison something about performance?
@LeviMorrison also: what about examples of what's not supported?
 
4:54 PM
@LeviMorrison you probably already know, but pmmaga seems to be quite familiar with the crazyness of traits and has been sorting several issues out there, so might be of assistance.
oh, and I still think you ought to shut down the out of scope discussion harder:
Nov 22 at 13:47, by Danack
@LeviMorrison To minimise your frustration with people going off topic, maybe at the end of the section "A future RFC may consider other..." make it more obvious you don't want to talk about them with "To reduce the amount of change introduced by this RFC, these topics are explicitly out of scope for this RFC, and should be discussed as part of separate RFCs."
 
!!> echo str_rot13('png');
 
thank you @Gordon
 
5:43 PM
@FélixGagnon-Grenier vice.com/en_us/article/mvk94y/…
because I have to share the cringe
 
@tereško I am going to buy tonight, I have to go through all the games you listed to see which one's I should buy first
 
I would advise: buy at least few of them
there will also be a winter sale, but after that the next bug one is only in the summer and some of the discounts do not repeat that often
 
5:59 PM
I think I am getting into the habit of buying games you don't play, let alone finish. So, I am going to buy few. I have already some ps2 games I bought and didn't open the cover
I think I will be 2 or 3 games during this sale
 
No E_ERROR level output from a recursive autoloading call – #77205
 
@samayo Good, I thought I was the only one.
 
@Danack I can put that in the email.
Thanks.
@ircmaxell I haven't measured it yet, but it's definitely going to add some cost for all inheritance.
@ircmaxell Such as?
 
@Trowski :)
@tereško which version of bioshock were you talking about?
 
@samayo if there is not number next to game's title, the it is the 1st version
 
6:21 PM
@LeviMorrison I just know that that's going to be something people bring up. Being upfront about it may head some of that off
@LeviMorrison I don't know. The RFC seemed to imply that the scope was targetted and narrow...?
 
@Trowski If you don't have at least a third of your steam library that you haven't played, do you even really have a steam account?
 
@Dereleased Yeah, it's about a third, lol
If I count the ones only my wife has played, then it's more like half.
 
6:50 PM
There's a site that will show a percentage of how much of your steam library has been played
I bought GTA yesterday after watching so many Funhaus GTA gameplay videos.
Something something Mars landing?
 
@Tiffany ah, more of the globe-earth lies and propaganda
 
@PaulCrovella lol
 
@tereško lol. ahhhh, millenials
 
@Tiffany They have a guy called Bruce Banner Banerdt who is a scientist.
She better not anger him!
 
@ircmaxell Made a note about performance in the implementation portion.
 
7:26 PM
:+1
 
@LeviMorrison You sure you want to include object at this stage? I understand the reason to do so but given the future scope (mixed, scalar), I feel we could wait with object as well..
 
object already exists -- all I am doing is adding variance to it.
 
PHP's mixed is.... odd.
I'd expect it to be a bottom type, but it's actually a top type.
 
Well, technically, it doesn't exist at all in the language ^_^
 
@LeviMorrison It's in the documentation. It exists.
Whether or not it's an actual concept of the PHP runtime.
 
7:29 PM
Yes, but given that the others don't exist yet and that people can kind of achieve that by omitting the parameter type, I'd be inclined to leave object on the side for now
 
@pmmaga I don't understand. What does that have to do with supporting object variance?
 
@LeviMorrison Because it will be the only "pseudo" type covered
 
Not true -- I support iterable.
 
What does object cover?
Any non-scalar?
 
@MadaraUchiha Non-scalar, non-resource, non-array. I think that's complete.
 
7:33 PM
@LeviMorrison Hmm.. I don't have a very strong argument... I dislike a bit object as I feel it typically leads to weaker design. If you don't know what you're getting just don't type hint it. But this is pretty much a personal preference, I guess
 
@pmmaga You need an escape hatch
I'd argue that object isn't a strong enough of an escape hatch, but "nothing" seems to cover any, so that's cool.
 
@pmmaga For what it is worth, object is not actually supported yet ^_^
 
hehe :D
 
Without a top-type escape hatch, migrating existing projects would be impossible, which makes the whole system much less practical.
 
I had partial support at one point but it got unintentionally removed when refactoring iterable support.
 
7:39 PM
@LeviMorrison do you think it's worth it to split the RFC into generic support, and then separate RFCs for object, mixed, etc? or not even worth it?
 
@MadaraUchiha Yeah, I guess I'd prefer to always leave that job to "nothing"
 
Object already exists. I don't think there's any reason not to include it right now. Since "mixed" does not I think it should have a separate RFC.
 
I realize this question might be absolutely stupid, but is there a reason that all php objects don't inherit from a single type, e.g. stdClass?
 
ah okay, just what was implemented
fair enough
 
@LeviMorrison What if the others never make it into the language? Won't it be kind of weird to support object but not scalar? (I guess that's also true for the language as a whole though... :P)
 
7:42 PM
We already have "object". It's in the language. Why should we not support it in variance?
 
I don't have any better argument at the moment to be honest.. I'll think it through a bit more
 
@pmmaga I kind of like that there's an any keyword
Explicitly saying that you mean "any" is nice
 
true
 
Insight almost landed
 
More than that, TypeScript has a nice feature where it forces you to say any if you want an any there, doesn't allow inferring any
 
7:54 PM
successfully landed! \o/
 
touchdown!
 
@Tiffany Yup! :d
As in, it assumes you've forgotten to add a type if it can't infer one out of the context
 
@MadaraUchiha I pre-typed it :P
 
@Tiffany YOU ALMOST JINXED IT
 
lol
 
7:55 PM
I waited until it was like 60 meters
 
TypeScript has a lot of neat features wrt typing, but the one that I'm missing most out of other languages (Java, C#, etc) is that all types are by default non-nullable.
 
I'm trying to use promises around some parts of graphql-php library, but have a hard time understand where execution happens when in a callable passed from the scope of a call call.
as in: when in the function parameter there:
return call(function() {
    return GraphQL::executeQuery(
        ...$someParams,
        function() { /* here. How do I get in amp context here */ }
    );
});
 
MarCO seems to be working well
 
running a Loop::run() inside the anonymous function seems to hang indefinitely
 
Okay, I've added object variance support, I think. Running tests to see if I goofed up anything else.
This shouldn't error, and should result in "C1", right?
interface I1 {
  function method1(I1 $o): object;
}
interface I2 extends I1 {
  function method1(object $o): I1;
}
final class C1 implements I2 {
  function method1($o = null): self {
    return $this;
  }
}

$o = new C1();
echo get_class($o->method1());
 
8:18 PM
@LeviMorrison yes, I think so
 
Should I add variance for Closure <-> callable? If so I should probably add __invoke support as well.
I think I probably should. I don't think it would be much work.
Well... I'm not sure what value it has at this stage -- callable with a signature wold provide more value but would be out of scope.
Guess I'll leave it alone for now. An RFC can cover all the callable concerns.
 
ThW
phpunit & testdox for a talk :-)
 
@FélixGagnon-Grenier That lib is nonblocking?
 
it's blocking, afaict
 
So why wrap it in a call?
 
8:25 PM
so that it can handle other calls during the time that one is computed?
 
But it is blocking
 
If the lib is blocking and you don't want to write your own you can spawn a new process instead
Let me give you an example
 
that would be much appreciated
 
With parallel functions you can do stuff in another thread / process effectively turning blocking code into non blocking code:
 
8:28 PM
god dammit. I had to reset my Windows password this morning, and I've forgotten already. I can't change it again because I don't remember the new one. FML.
 
return parallel(function () {
    return GraphQL::executeQuery(
        ...$someParams,
        function() { /* here. How do I get in amp context here */ }
    );
});
 
That would run the code in the body in another thread / process
And would return a promise
 
@LeviMorrison Nope...
callable is crazy enough as is
 
Or actually that would return a closure (which returns a promise)
Could make it a self invoking function if you need the promise instead
 
8:30 PM
I could get behind callable <-> Closure variance, but magic checks for __invoke would be a new level of weird
 
But maybe some more info about what you are doing allows me to better help you @FélixGagnon-Grenier
 
@NikiC If the class has an __invoke then it is always callable. Not really weird.
 
You make me realize that I might have only marginally understood the idea that blocking code does not magically become not blocking when wrapped in a call
 
Note this is the class/interface, not the object.
 
@LeviMorrison but that's not a type-system level property
 
8:31 PM
@FélixGagnon-Grenier It's just the same as in JS. It's single threaded so if you block you block it all
 
Eh, I disagree. But I think it deserves to be left out of this RFC to be considered by itself.
 
As in, the loop will not spawn threads for each promise so that others can be run
@PeeHaa right
 
@FélixGagnon-Grenier Nope.Either use nonblocking code / libs or spawn them
 
Oh, @NikiC, there was something I wanted to discuss with you: reference and variance.
 
ok, real talk now
can anyone explain to me that "density" shit that the flat-earthers talk about?
 
8:34 PM
Our pass-by-reference and return-by-reference semantics are such that the variance properties should hold true and are not violated.
This is because a pass-by-reference variable is checked only at the beginning of the call -- it is free to assign a totally different type during runtime.
 
@PeeHaa right. thanks! I feel that I will come back with more question when I realize I don't completely grok what blocking actually entails
 
Yes. The reference-ness itself is invariant, but it's entirely independent from type variance
 
However, property references with type info behave differently. In my opinion, that behavior is better and ideally would be used for parameters too.
 
@FélixGagnon-Grenier WHat graphql lib are you using?
 
actually, they offer an api to produce a PromiseAdapter so that the code becomes non blocking
 
8:36 PM
Is it worth requiring invariance for references to keep that option open? This is is my concern, @NikiC.
 
but I'm pedantic
 
@LeviMorrison That would also require a full out vs inout distinction.
 
@FélixGagnon-Grenier Yeah was just reading up on that webonyx.github.io/graphql-php/data-fetching/#async-php
 
@LeviMorrison I think what you should focus on is migration paths and expansion paths
 
@PeeHaa yup ;)
 
8:37 PM
Nice thing is you can use react promises in amp
 
@FélixGagnon-Grenier I think you misspelled "Liar" there
 
@LeviMorrison I think doing that would have a large number of other BC implications, to the point that variance is not the thing I would be worried about primarily.
 
Some way to allow you to not force variance in any specific case, but allow you to easily and safely add cases in the future, and allowing users to opt-in to them in increments.
 
@NikiC We could code out and inout differently than references, so what we do with references should not matter then?
 
@tereško Maybe? :P
haven't (yet) heard of that density thing
 
8:40 PM
well, they say that "gravity" does not exist, and things fall down because of the air density
 
Although I don't need to do anything with references, I should document how it interacts in the RFC.
 
@LeviMorrison yes
 
Anyone recommend a cloud backup solution? I don't want to use an external backup cause I've lost those in the past, but cloud also makes me a little uneasy for security reasons.
I can't decide if convenience of cloud is worth the potential compromise. But then again, I use an online password manager ...
 
8:51 PM
@Tiffany Using the "cloud" may be fine. But you should take care of encrypting whatever you're sending there yourself
 
That's a good idea
I'm having a bit of a lost-data scare cause of my forgot password predicament, and haven't had one of these scares in a long time... I usually can't care less if I lost data, but I don't want to deal with having to set up a bunch of the configurations I've already done... assuming any of them are saved to my SSD... most of everything is on my second hard drive...
I should probably encrypt my second hard drive, now that I think about it
 
My server can't seem to connect to ssl://smtp.outlook.com on port 587, I have no idea where to start. I'm using fsockopen() and getting error(0) which doesn't give me much information
I can telnet smtp.outlook.com 587 and it seems to resolve the host
I don't know if there's something with the certificates or something?
 
9:06 PM
is ssl:// the correct sceme?
 
I think so, outlook says that SSL must be enabled
 
@Alesana Which PHP version?
 
7.1
Correction, it's smtp.office365.com that I'm trying to connect to
 
Try tls:// instead of ssl://
 
In that case it says "DATA Not accepted from server"
Maybe it is TLS and there's just something else wrong here
 
9:18 PM
@Alesana In that case the data you sent is probably wrong?
At least ssl:// defaulted to TLSv1.0 before PHP 7.2 I think, might be that tls:// did that, too. So you need to provide the crypto_method explicitly and specify TLSv1.2 depending on the server.
 
Hmm maybe. I'm using a CMS so I thought it had to be something on the server blocking it, but I'll look into the code.
 
is it the orcs?
ah, yes, it's the orcs
I have been seeing it somewhere
obviously, Tolkien used orcs to represent Mexicans
and I would never use sarcasm, because sarcasm is also bad
 
@FélixGagnon-Grenier o/
 
@Dereleased \o
@Allenph ah fcs
 
So yeah, on PHP 7.1 tls:// is JUST 1.0
You can try "tlsv1.2" if you want to enforce TLS-1.2
Rather.... "tlsv1.2://hostname:port", obv
However, "ssl://" should allow all SSL and TLS protocols up to 1.2, so if that failed, then you have other issues
 
10:14 PM
To be fair it is quite racist.
Racist against races that represent values...in a fantasy book.
 
10:24 PM
Oh boy:
> Fatal error: Declaration of ReflectionClass::export($argument, $return = NULL) must be compatible with Reflector::export() in php/php-src/ext/reflection/tests/001.php on line 16
It looks like Reflector::export is static, so that looks like to be a documentation/arginfo issue. At least I hope...
Probably the same same issue here:
> Fatal error: Declaration of SplMaxHeap::compare($a, $b) must be compatible with SplHeap::compare()
 
@Allenph ugh...
 
@StatikStasis You dont think so? That's super unwelcoming bro.
 
@Allenph I know. I'm a horrible person. Also if I disagree with someone's opinion now I'm horrible too.
@Allenph Also, Duncan looks a lot like Gabe Newell.
 
11:02 PM
@NikiC We have at least two of these sorts of issues that my variance patch uncovered: github.com/php/php-src/compare/….
Should I target 8.0 and fix these, or code around them?
 
Wes
does this work?
class C{}
class D extends C{}
class E extends D{}

interface Inter{
    public function method(): C;
}

abstract class Abstr implements Inter{
    public function method(): D;
}

class Klass extends Abstr{
    public function method(): E{

    }
}
 
11:40 PM
@PeeHaa shits_on_fire_yo.jpg
 
Is it any different to use fetchAll rather than a cursor?
 
I'm just waiting for more packagist packages to get there tbh :P
 
@Allenph yes.
 
@Danack Internally it uses a cursor...I guess you could maybe cut out a loop potentially.
But really either way you could fill up your memory.
 
more likely to with fetchAll, probably.
 
11:53 PM
Why? Wouldn't you run out of memory anyways if you were using a while loop?
 
No, the garbage collection would almost always kick in first in php land, and whichever database you were using should be able to iterate over any number of results safely.
 
fetchAll ensures that it is all in PHP's memory at one moment. Depending on what you do it may not actually need that.
 

« first day (2963 days earlier)      last day (1992 days later) »