PHP define() vs const

Posted by clownbaby on Stack Overflow See other posts from Stack Overflow or by clownbaby
Published on 2010-03-15T14:23:57Z Indexed on 2010/03/15 14:29 UTC
Read the original article Hit count: 93

Filed under:

Pretty straightforward question: In PHP, do you prefer to do (and why):

define('FOO', 1);

OR

const FOO = 1;

Also, the code is NOT in a class.

Thanks.

© Stack Overflow or respective owner

Related posts about php