ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Dev
php-Dev
[PHP-DEV] Bug #14393: Function calling filename built-in access
by other posts by this author
Dec 9 2001 3:35PM messages near this date
Re: [PHP-DEV] possible bug in array_reverse() ? | Bug #14393 Updated: Function calling filename built-in access
From:             foobardotcom@[...].pl
Operating system: all
PHP version:      4.1.0
PHP Bug Type:     Feature/Change Request
Bug description:  Function calling filename built-in access

Create function, that will not constraint specifying __FILE__ who is
calling it.

  function vote($num) {
    global $votes;
    $votes[@func_get_caller()] += $num;
  }
  // 1.php: vote(5);
  // 2.php: vote(3);
  // all.php:
  include("1.php");
  include("2.php");
  print_r($votes);
  // should show array: array([1.php] =>  5, [2.php] => 3)
  // but without this function will show: array([0] =>  8)
-- 
Edit bug report at: http://bugs.php.net/?id=14393&edit=1


-- 
PHP Development Mailing List <http://www.php.net/> 
To unsubscribe, e-mail: php-dev-unsubscribe@[...].net
For additional commands, e-mail: php-dev-help@[...].net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
Thread:



Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved