ehabafia
1 month ago
461
15
Laravel

variable constant

Posted 1 month ago by ehabafia

Hello everyone,

Not sure if this is something allowed in PHP. I am looking to have a variable constant

	$string = 'SETUP_FEE';

	dd(Finance::$string);

This is basically what I am trying to do, is to get the class constant value of the string. This is now getting an error, is there a way to make it or this is not allowed by the PHP nature.

Thank you,

Please sign in or create an account to participate in this conversation.