Leave it.
I once benchnarked the if defined tests and they take up so little time (less than I expected - so little all I remember is "negligible") it's not worth time to remove them and they don't hurt.
Alec Teal
Marc Delisle marc@infomarc.info wrote:
Le 2015-08-01 16:10, Dan Ungureanu a écrit :
Hello,
I see the following snippet in almost every file of phpMyAdmin, but I believe that in most files it is not required.
if (! defined('PHPMYADMIN')) { exit; }
I think that it was used to prevent execution if a direct request was made to the file, but nowadays, most files contain only procedural code. In most cases, with or without this, the code behaves the same so it may be considered dead code.
I propose removing it where possible. What is your opinion?
Best regards, Dan Ungureanu
I agree that if the file only contains functions and classes, there is no point having this snippet, but I may be missing something.
-- Marc Delisle | phpMyAdmin
Developers mailing list Developers@phpmyadmin.net http://lists.phpmyadmin.net/mailman/listinfo/developers