Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apc_define_constants vs hidef vs define

Has anyone used apc_define_constants or hidef vs using define. Any true benefits or possible bugs in the latest versions?

apc-define-constants - https://www.php.net/manual/en/function.apc-define-constants.php

hidef - http://pecl.php.net/package/hidef

like image 790
NerdyNick Avatar asked Feb 28 '26 10:02

NerdyNick


2 Answers

I know this is an oldy, but since it comes up high in both SO's own search engine and Google: a nice article about the relative performance of the methods mentioned by the OP can be found here: http://shwup.blogspot.com/2010/04/about-constants.html

like image 114
kbunny Avatar answered Mar 03 '26 03:03

kbunny


I've used apc_define_constants quite a bit without any trouble - I've never tried hidef because of its 'alpha' status.

like image 23
TML Avatar answered Mar 03 '26 04:03

TML