« first day (3544 days earlier)      last day (1404 days later) » 

1:18 AM
@Trowski Just wanted to drop in here to say gratz on the 1.0.0 release of amphp/websocket. I look forward to checking it out.
 
@DarrenFelton Thanks, long time coming. I'll tag websocket-server tomorrow and websocket-client shortly thereafter.
I assume you're still using it?
 
1:57 AM
is it normal for closing tags to be automatically omitted when they are inside <script> tags?
e.g.
<script>
    <div>Test</div> <-- this closing tag
</script>
i'm running into bizarre issues where the closing tag is being stripped and in the dom it's <div>Test
(without the closing)
 
That's more of a JS question...
 
Its no bug
you are missing a closing tag somewhere else.
 
i was originally doing this in twig
so i stripped it down
it's just odd to me that if i was missing a tag
it would just remove my closing tag
 
are you trying to append that div to the DOM?
 
it happens even if i do it in javascript
so like if ido
<script>
var test = "<div></div>"
</script>
 
2:10 AM
yes
 
when i load the page source
it goes "<div>"
even in strings
 
ohh
 
i tried also literals
 
let me see all your html
or twig template file
 
then i tried doing it outside of php
and it works perfectly
just in a regular .html file
the twig template file is just what's in my html file
sec
 
2:13 AM
provably missing a closing tag or you have an extra ' or " in your class or id call
 
nah, i stripped it down a lot
 
That usually causes the page not to load correctly.
 
<!DOCTYPE html>
<html>
	<head>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>

	<body>
		<script>
			console.log("Hello world <div></div>");
		</script>
	</body>
</html>
it has to be a PHP bug, i'm on PHP 5.3
 
no
You are not using php in your file.
 
this is a twig file
test.html.twig
it's being utilized by the symfony framework
 
2:15 AM
first question
why are you still using 5.3
 
legacy code
i'm working in symfony 2.3
 
might be something to do with Symfony maybe.
 
don't really have a choice
yeah
not gonna spend too much time on it
ty
 
good luck with that.
 
 
1 hour later…
3:34 AM
@Derick well I did try a little already - no one here, or on internals has had any kind of info about the reasoning
 
4:25 AM
o/
 
 
1 hour later…
5:44 AM
good morning
 
6:07 AM
morning
 
morns
 
 
1 hour later…
7:33 AM
is there a free website where to design a database with crows foot notation ?
 
@Amundsen there are some offline tools that you can use, the online sites are usually paid, but they offer some trial or something.
 
@mega6382 found the draw.io website
 
8:22 AM
@Stephen imo, the reasoning is there in the RFC, it's just that it's wrong.
> They are meant to provide a light-weight mechanism for flexible code reuse, with the main goal being to avoid code duplication. Moreover, traits should not be confused with typical use cases of classes.
They deliberately chose to make them not be usable as people expect them to be used.
 
@Danack I've read that section about 4 times now. And every time I'm looking for the part where they acknowledge that property support is added, and some kind of explanation, but find nothing. It's just "we shouldn't do X <because code 'purity'>... so here is X". HUH?
 
13 hours ago, by Danack
@Derick er....there may be some 'wtf's in the 'reasoning'.
 
@mega6382 Danke!
 
But at this point I'm still without an option for an implementation. The RFC howto makes a pretty strong case for having that sorted, so I'm in a bit of a catch 22. It seems like writing the RFC without an imp is pointless, but who's gonna sign on to write it, without the RFC?
 
If you want some actual useful words for you to use how about: "People are using traits more extensively than was imagined when traits were first implemented. People are using them as part of classes, and the limitations of the implementation are unexpected hindrances that stop people from being able to write the code they expect to be able to write."
 
8:29 AM
ooh thats good.
 
@Stephen top-tip, do the work you can, as people are more likely to help when some of the work has already been done, and when they can offer a small limited amount of help, rather than taking up the whole task themselves. And that's why a github repo per RFC is good, as it allows people to help even just by pointing out problems.
 
Thanks.
 
/run on sentence runs on.
 
Much appreciated
 
9:04 AM
@TheodoreBrown @beberlei Want to chat about Attribute Amendments and Shorter Attribute Syntax for the podcast?
And... is there a zend_string version for the key for the add_assoc_* methods?
 
@Derick not that I'd know of
 
Incident on 2020-06-29 09:14 UTC
Incident on 2020-06-29 09:14 UTC ・ API Requests has Major Outage
Incident on 2020-06-29 09:14 UTC ・ API Requests has Major Outage ・ Notifications has Major Outage
Incident on 2020-06-29 09:14 UTC ・ API Requests has Major Outage ・ Notifications has Major Outage ・ Gists has Major Outage
finfo_file crash (FILEINFO_MIME) ・ Filesystem function related ・ #79756
Incident on 2020-06-29 09:14 UTC ・ Git Operations has Partial Outage ・ API Requests has Major Outage ・ Notifications has Major Outage ・ Gists has Major Outage ・ GitHub Pages has Major Outage
Incident on 2020-06-29 09:14 UTC ・ Git Operations has Partial Outage ・ API Requests has Major Outage ・ Issues, PRs, Dashboard, Projects has Major Outage ・ Notifications has Major Outage ・ Gists has Major Outage ・ GitHub Pages has Major Outage
 
9:38 AM
Dave wrote that didn't he
 
Incident on 2020-06-29 09:14 UTC ・ Git Operations has Partial Outage ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Major Outage ・ Notifications has Partial Outage ・ Gists has Major Outage ・ GitHub Pages has Major Outage
 
10:00 AM
@Jimbo @PeeHaa
 
 
1 hour later…
11:21 AM
job title: PHP Artist ... wat
> We are looking for a PHP ARTIST to paint one of our new product entirely from scratch.
 
Incident on 2020-06-29 09:14 UTC ・ Git Operations has Partial Outage ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Major Outage ・ Notifications has Partial Outage ・ Gists has Major Outage ・ GitHub Pages has Partial Outage
 
> Do you breathe Laravel, Code Igniter
 
Incident on 2020-06-29 09:14 UTC ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Major Outage ・ Notifications has Partial Outage ・ Gists has Major Outage ・ GitHub Pages has Partial Outage
Incident on 2020-06-29 09:14 UTC ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Major Outage ・ Notifications has Partial Outage ・ Gists has Major Outage
Partial System Outage ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Major Outage ・ Notifications has Partial Outage ・ Gists has Major Outage
All issues have been resolved!
 
11:49 AM
@Girgias are you taking suggestions for your RFC "Saner Numeric Strings"?
 
@Tiffany obviously
I rushed it a bit too have enough time to vote on it for PHP 8.0
 
@Girgias the examples in the beginning, instead of inline code, make them code blocks to be easier to read
 
12:05 PM
@Amundsen I believe I have used that, but it didn't have crow's feet arrows in it, I think.
 
user13606324
Hi can anyone help me with this please
https://stackoverflow.com/questions/62625034/image-is-not-displaying-after-editing-in-the-fetched-database-records-using-php?noredirect=1#comment110748278_62625034
 
@peers nope. You will need to debug your code to find out what is going wrong, and then ask a specific question if you can't fix it yourself.
 
Morning
 
user13606324
yeah I had done it actually in my code when I remove in the image part in ajax data and also in the query every other detail is being edited and stored in the database but the problem comes with image @Danack
 
user13606324
and with the code which I posted the image after editing is been stored as upload/ but not the path like upload/imagename.png/jpg that is the problem
 
user13606324
12:11 PM
@Danack
 
@peers I suggest reading sscce.org to understand how to better ask for help.
 
user13606324
image path is not storing properly in the database @Danack this is my problem to tell in short anyway I will read how to ask good question but I need some guidance about my problem please @Danack
 
@Tiffany IDK what Dvne is, so I guess that makes it a no ;)
 
Huh, maybe it was the only other person I know who listens to post-metal... I have several playlists in Spotify that I've made from people suggesting bands to me and getting around to listening to them the past few days
 
@Tiffany I am not much a Post Metal guy.
 
12:19 PM
@peers You have been given moderation feedback. You are apparently choosing to ignore that feedback. Ignoring moderation feedback is a good way of getting kicked from the room.
 
user13606324
@Danack ok
 
@Tiffany Done, it is indeed better :D
 
12:35 PM
@Derick it should fix most issues raised in that one but the first "classic" example Nikita mentions would still behave the same
$validValues = ["foo", "bar", "baz"];
$value = 0;
var_dump(in_array($value, $validValues));
// bool(true) WTF???
As the strings would be converted to int i.e. 0 silently as it currently does
 
that's how weak type comparisons in PHP work...
 
Well yeah
It doesn't change that
I may be wrong but Nikita wanted to change that behaviour in the RFC, that if the strings are not numeric then do a string comparison and not an int? It's been a while that I read that one properly
 
Want to chat about it for the podcast?
 
>>> This RFC proposes to make non-strict comparisons more useful and less error prone, by using a number comparison only if the string is actually numeric. Otherwise the number is converted to a string, and a string comparison is performed.

I'm not changing that with the RFC
Sure :D
There is another one which is in the pipeline for which I'm actually getting paid for
 
When?
 
12:39 PM
Hopefully within the next 3 days
I've got a prototype working, need to write the RFC
 
bbi1h, need to do my walk — Thursday 14:00 BST ?
 
Sure, you'll send me the email as usual I imagine?
 
1:16 PM
Segmentation fault error when using file_get_contents() function with ssh2.sftp ・ ssh2 ・ #79757
 
who knows things about wordpress? someone has just given me a 190MB .tar and said "make this wp site work"
halp :-P
I'm currently spinning up an ec2 instance for it and was planning to set up nginx/fpm, after than idk what I'm doing :-P
 
@DaveRandom Unpack it? Site is in there maybe?
 
yeh I know that much :-P I assume there's some sort of restore wizard or something, but also this archive seems to contain waaaaaaay more stuff than I would expect
it contains a /vendor directory apart from anything else
its 190MB compressed, apparently this is a site with 4 pages
I realise wp is fat and slow, but surely it isn't that fat
 
190 MB is mostly in uploads/ where are all images from posts.
 
/kills self
 
1:30 PM
Also wp-content consists plugins and themes directory. Now depending what admin installed there and how much. :)
 
doesn't the filename indicate what application created it? can you dump a tar --list somewhere?
 
(courtesy of @Tiffany)
@Sjon cpmove-igtcpk.tar.gz :-/
which smells of cpanel to me
it's fine I'm just going to do all the wp wizardy magic and see what happens
 
cpanel, oof.
 
Also, vanilla WP doesn't have vendor nor composer. I predict lot of fun when you check functions.php file and other finctions from widgets and plugins. @DaveRandom
 
yuhuh
 
1:33 PM
@Danack pong
 
@salathe er, are you on mobile, or otherwise not seeing room invites?
 
no he just doesn't feel safe alone with you, which tbf is understandable
 
@Danack took a while to join the room... wasn't sure how to do it!
 
@DaveRandom fair. talking of which, have you encountered youtube.com/user/marcrebillet yet? possibly shares your aesthetic for clothing.
 
ah, the homeless look
will have a look in a bit
 
1:58 PM
@Girgias Nice! What does this RFC do? :) Or is it a secret? :P
 
Is it more expensive to pass around an object that has a very large property (a 2mb file as a string, for example) than an object without it, if that property isn't accessed?
 
@Alesana no
 
@NikiC Thanks!
 
php8 bug yes or no? 3v4l.org/FUe17
 
@Sjon no
 
cmb
2:06 PM
 
@Girgias Never mind, detective Máté has just found it out ^^ :P
 
@NikiC If you have easy access to Roman, can you tell him I lost the google meet link and he should email it? :-)
 
assuming which Roman, he's on twitter @ pronskiy
 
@Sjon the output seems to be unaffected by the precision ini setting. (3v4l.org/fItCb vs 3v4l.org/d7l8R) which may be expected now, but I don't know the background for why that is
 
@Derick I gave him a ping ^^
 
2:31 PM
@MátéKocsis not that hard considering I'm pushing it to my repo
Although I'm not sure why my it's fucking up without a file without a declare when it's included
But that's a problem for tmr me
 
@Girgias Yeah :D
 
Wes
2:52 PM
\o
 
@NikiC CHeers - already got it working by then, but cheers :-)
 
3:28 PM
@Derick Right now there are two ballots with duplicate preferences (kguest picked <<>> as both 2nd and 3rd choice, and sergey picked @@ as both 1st and 2nd choice).
Do we simply discard these, or is the first preference still counted?
According to dur.ac.uk/committees/aea/election/voting/stv it sounds like preferences before the duplicate is reached are still counted.
 
@TheodoreBrown My script throws them out, it doesn't matter though...
@@ wins
 
Yeah. I just wasn't sure if there was a "right" way to handle it.
 
In our real local elections, having the same rank twice makes it an invalid vote
@@ wins without transfers even, just straight off
 
3:42 PM
and if the 1st pref of the broken ballots was counted, quorum would be one higher at 31, but there'd be two more votes (34) for it too
 
Isn't there an optimization for certain language-version constants so that if you have code that is like if (PHP_MAJOR_VERSION == 5) { function foo() {} } that foo() won't even be compiled on PHP 7? Or something?
 
update libpq.dll to most recent supported version ・ PostgreSQL related ・ #79758
 
4:03 PM
@LeviMorrison I would stick them in an include file instead
that way you can selectively include files (or not)
 
That might be better overall, but I'm pretty sure there was some sort of optimization around these things.
 
@MátéKocsis do you have any notes on what issues an 'immutable' keyword would have?
 
4:31 PM
@NikiC The variadics part of named parameters makes me nervous.
I am confident that quite a few people have used parameter packs to ensure they have tightly packed arrays...
 
@LeviMorrison I think there's limited dead-code elimination logic in there somewhere. Whether that specifically would get optimized away I'm not sure. Seems testable, though.
 
It doesn't seem to do that
but it does coalesce PHP_MAJOR_VERSION == 5 to false:
 
@LeviMorrison not sure I follow
 
I mean, I follow the part where it will definitely cause issues for someone, but I don't get the example you have in mind there
@LeviMorrison @Derick worth noting that while the code to declare the function is DCEd, the actual function is not :)
 
4:39 PM
@NikiC Without your patch, function (...$args) {} guarantees that $args will have only numeric keys and that they are in-order without holes, starting at 0.
 
yes @NikiC — but wy is the "DECLARE_FUNCTION" not DCEd?
 
4:50 PM
Andre just made my day.
 
I don't remember; with the internally packed arrays do we support starting at something other than zero?
 
5:58 PM
@Danack An immutable class keyword? Or you're referring to write-once/readonly/init-only properties? :D
 
@MátéKocsis the catchily named write-once/readonly/init-only ones.
 
After taking Rowan's links the idea of data classes Records after we get named arguments and with init accessors could probably be 100% copied from C# 9.0
TBH I was thinking of data classes as a second try after object-initializers failed
But without agreement on named arguments, this would cause a debate on syntax again. After we agree with named arguments it might make sense to have object initializer and data classes
data class could have a semantic little different as it would make sense to compare by value not by ref and with the with expression it covers cloning and mutating - IMHO brilliant.
Any thoughts?
 
@Danack Haha :) Although I don't have a note yet, I can list a few problematic areas:
1.) support for clone
2.) constant-alike init-only properties that have a default value
3.) untyped properties that have an implicit default value
4.) and finally: the relation to property accessors
In the past, the name itself was also problematic, but I think, in the hindsight of the C# feature, init-only is the best one :)
 
why is "untyped properties that have an implicit default value" a problem?
 
because adding support for init-only in not straightforward in case of untyped properties that implicitly have a null default value
there are two options: forbidding them to use the init-only modifier (my RFC took this approach), but they could also be marked as mixed (so that they don't have an implicit default value anymore)
that was of the main motivations why I wanted to make sure the mixed type is added to PHP ^^ :D so that I have more options if people complain :)
 
6:24 PM
Can I get some opinions on my idea to solve the cloning issue? I've already told this in the past, but there was not much feedback. So my revolutionary idea is to go with "with" statement for clone, e.g.:

$self = clone $this with {property1: true, property2: false};

Of course, visibility rules would still apply. What do R11 think about it?
 
nope.
if nothing else, you need to be able to write conditional code inside the clone....
aka I instinctively don't like it, and that was the first rationalisation of why I don't like it I could think of....
 
You can clone multiple times if needed. Some of the clones can be put inside a condition
 
@MátéKocsis I think that the syntax in {} first of all should follow the named arguments if they pass
 
Yes, I agree!
 
Secondly I don't think clone is still needed, similarily to C# 9.0 without clone
In the end I'd love to see in future data classes with OI following the same syntax and with init-only default semantics for properties:
data class Foo { string $bar; }
$foo = new Foo {bar: "baz"};
 
6:31 PM
I also agree that clone support could be added later, but apparently this question really held people back from voting yes, so it's better to solve the issue now
 
Well that's my personal opinion/vision
 
@MátéKocsis That's essentially what Rust does, give or take syntax. I don't know why conditional inside the clone is needed...
I think a large part of the disconnect is that we're now looking to copy functionality from languages that have package-level visibility. That means within-package, public properties are less of an issue. PHP is a class-level visibility language, viz, the boundary of access and the boundary of data structure are the same. That was very common for a long time in language design, but I think the industry is finally realizing that alignment was a mistake.

There's a lot of things with more raw structures that are very reasonable to do when you have package level visibility rather than class
 
@brzuchal Yep, if init-only would succeed once, then the immediate next thing I'd do is to create an RFC for immutable/data classes :D
 
@MátéKocsis I was thinking over structs for last 6 months, but recently realized it'd be easier to borrow data classes from C# change semantics of object comparison as it was in PHP 4 - by value, so the instances could be pass by value and not pass by ref, and in the end with recently added attributes it could have play well with attributes specifying stricter types for protocol readers, like you could unpack a data class from stream directly only by passing data class name :/
That's too much to tacle at once :/
 
@Crell Is give or take similar what Nikita was talking about in a comment on my immutable object PR (https://github.com/php/php-src/pull/5165#issuecomment-584583761)?

return new static { foo => $foo, ...$this };
 
6:43 PM
print match ($undefVariable) {
    null => 'null?',
    default => 'default?',
};
@NikiC Until now match threw an exception here, it's not really consistent with the rest of PHP. Should this print null? instead?
 
@MátéKocsis peakd.com/php/@crell/… - Yep. Rust's syntax is essentially that, although it uses 2 dots instead of 3.
 
@IluTov yes
 
@NikiC Ok, I'll adjust that.
Thanks :)
 
Hi all
 
@Exception Just when we're talking about exceptions :P
 
6:45 PM
once class is defined as final then there is no meaning of making it's member methods as final, am I correct?
@IluTov haha indeed
 
@MátéKocsis it's not just a syntax dislike. Code for cloning something needs to be inside the class, not floating around randomly in an application....
 
@Danack Does it? There's different ways to clone the same object. IMO it belongs in a service.
Maybe I'm just scarred from the legacy projects I'm working on that use clone.
 
@Danack "Clone with" would still stayed inside the class, because visibility applies.
 
possibly. My reasoning is that if there are any private properties that aren't exposed to the world, which need to be looked at during the cloning process, the only sane place to have that code is within the class.
 
Most probably inside "wither" methods
 
6:49 PM
I don't like the following, but it would be a little bit less horrible imo:
class foo {
      function __clone() {
         // whatever code...
         end_init($this);
      }
    }
 
class Foo {
    public function __with(string $name, mixed $value): void {
    }
}
 
or some other way to explicitly end the init period.
 
:P
with the above make a clone and run __with for all passed arguments to with {} expression
or just name it __init(string $name, mixed $value): void
 
@Danack This is what I exactly mean: gist.github.com/kocsismate/… I quite much like it. :)
 
Couldnt these things all be attributes and an extension enforces the constraints?
You could ship for php 8, avoid all the discussion with people, win ;)
 
7:00 PM
@MátéKocsis Replace with with use or some other keyword and you don't even have to deal with a BC break!
 
@beberlei :D I'm not exactly sure how much an extension can achieve, but quite a few changes were in zend_execute.c (which directly supports the VM)
 
Couldnt you switch the property handler?
 
@beberlei no, that's alone not enough. There are some operations (like ++/--) which has to be handled on the VM level
 
Unimportant edge cases :)
 
@LeviMorrison Thanks for the suggestion! I'm pretty much open for any naming choice for the keyword :)
 
7:06 PM
@MátéKocsis how about Horatio Hornblower?
 
I'm also fine with reserving with -- I bet it will come in handy if we ever do get generics :)
 
T_HORATIO_HORNBLOWER
 
@DaveRandom :D Sorry, I wanted to say "reasonable naming choice" instead :D
 
T_ROFLCOPTER?
 
7:21 PM
@Girgias pssst, separate lines, one semicolon per line :P
It may not seem like it's necessary, but it helps
 
@MátéKocsis if you're going the named arguments path, you don't need any new syntax imo:
clone($this, price: $price);
assuming that there's no problem in making clone be a function that takes arguments.
 
@Tiffany I concur. Otherwise there's horizontal scrolling on mobile.
 
8:03 PM
Impossible to use PHP 7.3 and 7.4 together and smoothly migrate between them ・ *General Issues ・ #79759
 
8:18 PM
...
 
8:53 PM
Just fishing if someone knows off the top of their head... does php-src have an interned empty string? And how to get a pointer to it?
Found it!
 
@Trowski yes, still using amphp/websocket-client. It's been a while since I've performed a composer update on the package but have had my json set to dev-master and never have ran into any issues with it.
 
 
2 hours later…
11:20 PM
!!rfcs
 

« first day (3544 days earlier)      last day (1404 days later) »