|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-10 20:42 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2012-11-10 20:42 UTC] nikic@php.net
[2012-11-10 21:11 UTC] dev at pp3345 dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 07:00:02 2026 UTC |
Description: ------------ Registering a private method as a tick function leads to two errors on every tick. Test script: --------------- <?php declare(ticks = 1); class A { public function __construct() { register_tick_function(array($this, 'a')); } private function a() { echo 'Called'; } } new A; ?> Expected result: ---------------- CalledCalledCalled Actual result: -------------- Called Warning: Invalid callback A::a, cannot access private method A::a() in /var/vhosts/pancake/default/register_tick_function.php on line 15 Warning: main(): Unable to call A::a() - function does not exist in /var/vhosts/pancake/default/register_tick_function.php on line 15 Warning: Invalid callback A::a, cannot access private method A::a() in /var/vhosts/pancake/default/register_tick_function.php on line 17 Warning: main(): Unable to call A::a() - function does not exist in /var/vhosts/pancake/default/register_tick_function.php on line 17