From:             [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to