brianhaveri/Underscore.php — Issue #4: Static invocations such as __::each raise E_STRICT warnings
Author: jdp
Created: 2011-12-10 10:30:18+00:00
State: open

Using the static method invocations, like `__::each` and `__::map` will raise `E_STRICT` warnings. For example, calling `__::filter` will raise this chain of warnings:

Array
(
[number] => 2048
[string] => Non-static method __::filter() should not be called statically
[line] => 55
)
Array
(
[number] => 2048
[string] => Non-static method __::select() should not be called statically
[file] => ../lib/underscore.php
[line] => 182
)
Array
(
[number] => 2048
[string] => Non-static method __::_wrapArgs() should not be called statically
[file] => ../lib/underscore.php
[line] => 184
)
Array
(
[number] => 2048
[string] => Non-static method __::_collection() should not be called statically
[file] => ../lib/underscore.php
[line] => 186
)

As of PHP 5.4, `E_STRICT` is or'd into the `E_ALL` constant, so scripts that report all errors will show these.