adspace


How to make a constant and use globally?

Answer Posted / Kamlesh Kaushal

To define a constant in PHP, you can use the `define()` function or declare it at the top of your script. To make it available globally, you should define it before any class declarations. For example:nn```phpndefine('MY_CONSTANT', 'some value');nclass MyClass {n //...n}n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How much laravel experience do you have?

815


What is latest version of laravel?

869


Tell us have you used lumen before?

808


Do you know what version of laravel do you generally use?

839


What is current stable version of laravel?

870