International PHP Conference 2019 - Spring Edition

Constante predefinite

Fiecare clasă descrie propriile constante.

add a note add a note

User Contributed Notes 1 note

up
0
sadisticnepal3339 at gmail dot com
6 months ago
PHP user-defined constant can be like this:

define('APP',
[
  'name'=>'Sadish',
  'hobby'=>'Coding',
   'occupation'=>'student'
]);

Here, APP is the user-defined constant which is defined using define() function available in PHP.

Also, Simply anything, like this :
  define('APP','Demo PHP');
is a user-defined constant, which basically replaces any code available in PHP named as APP with the value 'Demo PHP'.
To Top