Schrank, German
@Schrank@phpc.social avatar

Hey people! Is there a way to implement an abstract constant? I have an abstract class which implements some stuff for my value objects and a constant IDENTIFIER I would like to enforce to be overwritten by the child classes.

It looks like there was a way in the past by using circular references: https://itecnote.com/tecnote/php-abstract-constants-in-php-force-a-child-class-to-define-a-constant/ but this doesn't work anymore.

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