dseguy, French
@dseguy@phpc.social avatar

How to clean after oneself in ?

There are three methods to ensure that this little cleanup code is always executed, no matter what : register_shutdown_function(), function __destruct() and try-finally.

https://www.exakat.io/en/how-to-clean-after-oneself-in-php/

velkuns,
@velkuns@phpc.social avatar

@dseguy cool article 👍

Just a typo in second example: the first method should be __construct(), I guess 🙂

dseguy,
@dseguy@phpc.social avatar

@velkuns Fixed. Thanks...

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