Home Board Paper Solutions Text Book Solutions Articles NCERT Exemplar Solutions
Home >> General Article >> Programming

## Difference between constant and define function in PHP

Posted On 2017-02-27

1. const takes a plain constant name, whereas define() accepts any expression as name. This allows to do things like this: for ($i = 0;$i < 32; ++$i) { define('BIT_' .$i, 1 << \$i); } 2. const a....