PHP bad practice: the use of extract() Working with complex data structures in PHP requires the use of associative arrays. Even PHP classes are an extension of this concept. There are always disadvantages when one does not have alternatives (e.g. strictly defined data structures - see ...
New whitepaper added We're often asked about the quality of the translated code, from an architectural point of view. So we have coded a small test application in PHP, translated it into Java using plain servlets and then Spring MVC, and we discuss the results in a new ...
PHP bad practice: variable reuse Anyone who has worked with PHP knows that it is extremely permissive with variables and their types. There's no need to declare variables, not even at class level, and data types cannot really be enforced. This is one of the greatest strengths of weakly ...
Re: PHP bad practice: the use of extract() The extract function has a very specialized use. And I agree it should not be applied to the alternative scenarios you outline at the end, which in essence deal with working with function or method parameters. The one case where I've found it useful is ...
Re: PHP bad practice: variable reuse In this case the same variable holds the end-result of the transformation having the same type. This is similar to output composition ($str = ''.$str.''), a very reasonable operation in my opinion.
Login
There are no blog entries for the chosen time period.