XH 1.7: Use const keyword instead of define()

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: XH 1.7: Use const keyword instead of define()

Post by Holger » Sat Feb 28, 2015 6:39 pm

svasti wrote:Sorry, I have not been able to find const in the php online manual. Where do I have to look for it?
See here: http://php.net/language.constants.syntax

A nice discussion about that topic can you find here:
http://stackoverflow.com/questions/2447 ... e-vs-const

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.7: Use const keyword instead of define()

Post by cmb » Sat Feb 28, 2015 6:49 pm

Holger wrote:A nice discussion about that topic can you find here:
http://stackoverflow.com/questions/2447 ... e-vs-const
Very nice, thanks for the pointer!

I was very surprised about the following:
consts are always case sensitive
I actually thought const constants were case insensitive (like function and class names).
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.7: Use const keyword instead of define()

Post by svasti » Sat Feb 28, 2015 7:05 pm

Thank you Holger. It's quite hidden in php's online manual.

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: XH 1.7: Use const keyword instead of define()

Post by Holger » Sat Feb 28, 2015 7:07 pm

cmb wrote:I was very surprised about the following:
As I said, there are much more than minor differences ;) .

Post Reply