b_viguier, French
@b_viguier@phpc.social avatar

TIL: in , you can create a new instance (not a clone) of an object from an existing instance with the following syntax:

$a1 = new A();
$a2 = new $a1();

Very convenient with anonymous classes! Just a bit confusing if you expect $a1() to call the A::__invoke magic method (because it won’t)

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