dseguy, 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!

NanoSector,
@NanoSector@nanosector.nl avatar

@dseguy This is extremely cursed :blobcatNotLikeThis:

dseguy,
@dseguy@phpc.social avatar

@NanoSector it took me a few years to find one in the wild. You can relax.

pollita,
@pollita@phpc.social avatar

@dseguy I say this with all the love in my cold black heart.

Fuck that code.

dseguy,
@dseguy@phpc.social avatar

@pollita Coming from you, I take it as a compliment. Thanks 😎

wez,
@wez@fosstodon.org avatar
dseguy,
@dseguy@phpc.social avatar

@wez Touché.

edorian,
@edorian@phpc.social avatar

@dseguy big fan. Thanks for sharing

dseguy,
@dseguy@phpc.social avatar

@edorian Always a pleasure.

As long as I don't find this in your code, of course. 😂

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.

heiglandreas,
@heiglandreas@phpc.social avatar
dseguy,
@dseguy@phpc.social avatar

@heiglandreas 😂 :elephpant:

Crell,
@Crell@phpc.social avatar

@dseguy PHP let you do some stupid ass shit...

dseguy,
@dseguy@phpc.social avatar

@Crell I knew that trick for a while now, but I only found it in actual code yesterday.

One less to find in the wild, still waiting for a few of them to appear.

"If there is a mean, there is a will."

ocramius,
@ocramius@mastodon.social avatar

@dseguy noooooooooooooo

asgrim,
@asgrim@phpc.social avatar
dseguy,
@dseguy@phpc.social avatar

@asgrim @ocramius This was not a question!

dseguy,
@dseguy@phpc.social avatar

@ocramius 'that was not a question' (tm)

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