Open
Description
While WP still has a minimum requirement of PHP 5.2 and a lot of related projects code accordingly, there are also numerous projects out there which have set their plugin/theme minimum requirement at PHP 5.3 or higher.
Most sniffs currently don't take things like namespaces into account so the below code would trigger an error (even though the fwrite
function in this case is namespaced).
While this may not be the best example (or good practice in the first place), I would like to suggest we review code to see if we can make it more forward compatible with modern PHP code.
namespace MyNamespace;
function fwrite() {
// A compat layer or something.
}
class My_Class {
function do_something() {
fwrite( $param );
}
}