Homec4science

Avoid autoloading self and parent in PHP 5.2

Authored by Jakub Vrana <jakub@vrana.cz> on Jul 11 2013, 20:15.

Description

Avoid autoloading self and parent in PHP 5.2

Summary: call_user_func(array('parent', 'insert')) issues E_STRICT in 5.1.2 <= PHP < 5.3.0.

Test Plan:

class C extends D {
  function f() {
    call_user_func(array($this, 'self::g'));
  }
  function g() {
    echo "C::g()\n";
  }
}
$c = new C;
$c->f();

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6427

Details

Committed
Jakub Vrana <jakub@vrana.cz>Jul 11 2013, 20:15
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUec2a74f18d72: Let PHP decide whether to use int or float in evalStatic()
Branches
Unknown
Tags
Unknown

Event Timeline

Jakub Vrana <jakub@vrana.cz> committed rPHUadfaa4af7db8: Avoid autoloading self and parent in PHP 5.2 (authored by Jakub Vrana <jakub@vrana.cz>).Jul 11 2013, 20:15