[
https://issues.apache.org/jira/browse/THRIFT-717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicholas Telford resolved THRIFT-717.
-------------------------------------
Resolution: Won't Fix
I've been convinced that there's no win to be had here. Closing.
> Global variables should not be used for configuration of PHP library
> --------------------------------------------------------------------
>
> Key: THRIFT-717
> URL: https://issues.apache.org/jira/browse/THRIFT-717
> Project: Thrift
> Issue Type: Improvement
> Components: PHP - Library
> Reporter: Nicholas Telford
> Priority: Minor
> Attachments: thrift_php_globalsToConstants.diff
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> The Thrift PHP library makes gratuitous use of the $GLOBALS array to store
> basic configuration.
> Globals in PHP are generally bad practice, so I suggest something else: Use
> constants.
> Being immutable, constants are more secure than globals (that could be
> overwritten in scripts susceptible to injection attacks); they also perform
> much better, since the $GLOBALS variable is a hash-table, lookups are
> comparatively expensive.
> I will attach a patch soon unless anyone has any better ideas.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira