shochdoerfer,
@shochdoerfer@phpc.social avatar

Never thought I would say it, but constructor property promotion is really a neat feature in PHP.
I really miss it in some other programming languages...

ravetracer_22,
@ravetracer_22@phpc.social avatar

@shochdoerfer We rewrote every constructor of our project some months ago and got rid of a big bunch of unnecessary code!

shochdoerfer,
@shochdoerfer@phpc.social avatar

@ravetracer_22 removing unnecessary code is always the best :)

odrotbohm,
@odrotbohm@chaos.social avatar

@shochdoerfer Nice! Java has this for records. I’ve heard it’s coming for plain classes, too, but it looks like you got there first! 🙂

shochdoerfer,
@shochdoerfer@phpc.social avatar

@odrotbohm PHP isn't the same as it was 20 years ago ;)

Btw, Typescript also supports it as I just figured out. So hurry up, Java ;)

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