@edorian@phpc.social avatar

edorian

@edorian@phpc.social

👋 I'm a magic __method();

Well, a Software Engineering and Management Human interested in Ops, growing systems, shipping, DX, PHP, etc.
Gaming enthusiast. He/Him.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Crell, (edited ) to php
@Crell@phpc.social avatar

Hey #PHP. When you use union and intersection types, do you include spaces?

(RT for reach, etc. This is survey data for @phpfig. If you know of any official policies by major projects already, please note/link in the replies.)

#codingstyle #phpfig

edorian,
@edorian@phpc.social avatar

@Crell @phpfig for everything that has more than a simple & or | chain having spaces is such an accessible thing for me, allowing me to parse the blob of symbols.

If my editor would highlight the braces and symbols differently from the text I would have more of a chance without spaces, but as it is, it's very annoying. Especially because they need to restate the compound types everywhere, not just define them once like in TS.

edorian,
@edorian@phpc.social avatar

@Crell @phpfig For me, somehow yes.

If there are no braces I know at the first symbol that it's a uniform list and that I can just go and skip-scan through the text.

But (ClassNameWithSomeLength|(Foo|Bar))&Baz type constructions are quite hard for me to parse visually.

Might be the |( and &( constructions. Unclear t.b.h., just noticed it's more of a strain.

Given how rarely such complex types happen I'm going to be fine either way :)

cspray, to php
@cspray@phpc.social avatar

Couple weeks ago speaking with @ocramius about Annotated Container. He brought up something about Attributes I had heard a few times before. Something along the lines of:

"I don't want container wiring code littered throughout my codebase."

So, I wrote a blog article that talks about how Attributes aren't really the point of Annotated Container and how you can use the library with no Attributes or highly limit their spread through your code.

https://www.cspray.io/blog/annotated-container-without-attributes/

-container

edorian,
@edorian@phpc.social avatar

@cspray neat which specific negative experiences everyone made

I don't want a big garbage pile of central wiring code

Best case the code locally states what it should get injected in the default case, everything else is autowires.

For me services.xml/yml are the worst, services.php is bad and everything locally where the class is defined is something I found to be scalable and easy to work with for big teams across time.

edorian, to php
@edorian@phpc.social avatar

Back from vacation and excited to announce that we, over at , now fully support

https://www.linkedin.com/posts/tideways-gmbh_frankenphp-activity-7191031503009587202-qUFj

It's great to see the ecosystem grow and prosper and I believe proper tool support and performance insights will only help when it comes to choosing the right tool for your job.

It's been a bit of a struggle getting everything to work for me, but thanks to our C specialists all the test scenarios I wrote along the way are now passing, including

mgdm, to random
@mgdm@altelectron.org.uk avatar

Building a slightly daft webapp using 2000s spec JS techniques (lots of <script> tags, no bundling) has been pretty fun. Ditching the frameworks can be rewarding

edorian,
@edorian@phpc.social avatar

@mgdm HTMX has a lot of that feel for me

wyri, to random
@wyri@haxim.us avatar

I am a Dwarf and I'm:

edorian,
@edorian@phpc.social avatar

@wyri well done sir

edorian, to random
@edorian@phpc.social avatar

Had a good chat about https://wiki.php.net/rfc/property-hooks with a colleague today.

Happy with the result. Looks like PHP, leaves options to address future issues. Great first step.
Excited about the potential performance gains.

If I'd have voting rights* I'd vote yes wholeheartedly.

Big thanks to the authors! I can imagine this wasn't an easy discussion.

--
*Don't think I should have voting writes, I do PHP and C-Extensions, not core and I'll comment when I have user-land feedback, but that's enough.

edorian, to random
@edorian@phpc.social avatar

Book-a-table style service with a method of bot detection that I haven't seen before.

edorian,
@edorian@phpc.social avatar

@rdohms opt in harassment, something only the humans would do

Girgias, to random
@Girgias@phpc.social avatar

Happy Easter and Trans Day of Visibility from the Japanese mountains!

edorian,
@edorian@phpc.social avatar

@Girgias eeeegg

dseguy, to php French
@dseguy@phpc.social avatar

I finally found an occurrence of this beauty :

$this->$this

It still looks like a typo in the original code, but with the help of __toString, it works. Also, strict_types doesn't help here.

https://php-tips.readthedocs.io/en/latest/tips/this_this.html and more tips!

edorian,
@edorian@phpc.social avatar

@dseguy big fan. Thanks for sharing

edorian,
@edorian@phpc.social avatar

@dseguy I've done worse tbh. And some of it turned out to be a good idea for very specific circumstances.

Yet to find a sensible reason to use toString though.

phpc, to random
@phpc@phpc.social avatar

Hi, instance folks!

Thank you so much for your generosity in supporting this service. We hope you find it beneficial.

Currently, our monthly expenses are higher than monthly contributions. Thanks to one-time donations, we have reserves that allow us to operate like this, but we will eventually run out.

Please consider signing up for a recurring (monthly or yearly) contribution to ensure we can keep this service running.

Details are here: https://opencollective.com/phpcommunity/projects/phpc-social

edorian,
@edorian@phpc.social avatar

@phpc

Thank you!

edorian, to factorio
@edorian@phpc.social avatar

Just finished a 2 player co-op run of with the mod set.

While my friend hasn't played much classic before we still decided to go for the more complex playthrough, and it worked out great.

145 hours to launch the rocket and so much fun refactoring. The mod set is in a really good state, good pacing, lots of options to build big or clever, meaningful differences in approached.

Can recommend! (We tuned off Bob's Greenhouse to make it a bit more challenging /interesting)

edorian,
@edorian@phpc.social avatar

@klimpong there are dozens of us.

It's a really fun game. Happy to talk more about it if you're curious

wyri, to php
@wyri@haxim.us avatar

New PC who this! Gave the @reactphp Hello World a quick benchmark, clocks in at nearly 70K requests per second with 100 concurrent keep alive connections on a single process:

edorian,
@edorian@phpc.social avatar

@wyri what's your test setup for this?

edorian,
@edorian@phpc.social avatar

@wyri thank you!

edorian,
@edorian@phpc.social avatar

@wyri I was mainly wondering about the tool your using (ab, siehe, jmeter, etc) and if it's keepalive or not.

Not at my gaming PC at the moment but want to compare that as well :)

flowcontrol, to php
@flowcontrol@phpc.social avatar

I wrote a thing!

is not the hype anymore (I think), but nevertheless I wanted to try my best solving this in

https://dev.to/realflowcontrol/processing-one-billion-rows-in-php-3eg0

edorian,
@edorian@phpc.social avatar

@flowcontrol loving it. Thanks for the post. It was on my to-do list to make a write-up as well but I'm very happy you did.

Fun read!

asgrim, to random
@asgrim@phpc.social avatar

I'm gonna be on a live stream on Friday!!! Will be chatting about the new PECL replacement tool, PIE 🥧 that I'm working on...

https://www.youtube.com/watch?v=uWsGDUCxbT0

edorian,
@edorian@phpc.social avatar

@asgrim very excited

edorian, to random
@edorian@phpc.social avatar

In the PHP 5.3 days we had a couple use cases where we did object to array casts and used the var_dump($x["\0ClassName\0PropertyName"]); formatting to extract data.

(It was really fast compared to Reflection back then and it was for a good cause. I promise :P)

https://3v4l.org/Sk0Iu

Today while chatting with @beberlei about those times I was reminded that in 7.4 https://www.php.net/manual/en/function.get-mangled-object-vars.php was introduced.

Totally missed that at the time. Good memories!

Have you ever used this, and why? :)

wyri, to random
@wyri@haxim.us avatar

Geesh they hide logic gates everywhere these days! Found one in my groceries just now 😱

edorian,
@edorian@phpc.social avatar

@wyri or did you 😱

saki, to random
@saki@phpc.social avatar

Does "OK" not give a very good impression? Does "I got it" make a better impression?

Japanese people tend to use "OK" in a very positive way, so I may have to be careful when using it.

edorian,
@edorian@phpc.social avatar

@saki for me it's absolutely fine. It's a bit informal but depending on the context that's ok.

I wouldn't expect anyone to take offense there.

In writing things are always more complicated.

A "Ok..." Might be perceived as a bit passive aggressive. So I usually go with "Ok 👍" or "Sure".

But without knowing the context, I wouldn't worry.

saramg, to random
@saramg@fosstodon.org avatar

What's a polite and professional way to tell a Senior Staff Engineer, "Your technical design document is garbage and you should feel bad."?

Asking for a friend.

edorian,
@edorian@phpc.social avatar

@saramg is this for a promo doc or are you thinking of asking someone to implement this?

edorian,
@edorian@phpc.social avatar

@saramg oh. Well. "Can you send me the version of the doc after the whiteboard playground phase where we considered integrating this into the product instead of the greenfield test case? Thanks!"

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • GTA5RPClips
  • thenastyranch
  • ethstaker
  • everett
  • Durango
  • rosin
  • InstantRegret
  • DreamBathrooms
  • magazineikmin
  • Youngstown
  • mdbf
  • slotface
  • tacticalgear
  • anitta
  • kavyap
  • tester
  • cubers
  • cisconetworking
  • ngwrru68w68
  • khanakhh
  • normalnudes
  • provamag3
  • Leos
  • modclub
  • osvaldo12
  • megavids
  • lostlight
  • All magazines