From:             Mike_G at ufamts dot ru
Operating system: 
PHP version:      5.2.6
PHP Bug Type:     Feature/Change Request
Bug description:  I suggest changing get_functions_defined() function function

Description:
------------
I suggest changing get_functions_defined() function to have flag/option to
return user function by includes/requires.

Example:

#require1.php
<?php
  function one()
  {
      return 1;
  }
  function two()
  {
      return 2;
  }
?>

#require2.php
<?php
  function three()
  {
      return 3;
  }
  function four()
  {
      return 4;
  }
?>

#main code
<?php
  require_once('require1.php');
  require_once('require2.php');
  
  $fn_arr = get_functions_defined(true);        // true - is enabled return user
function by
                                                                                
        // includes and requires.
  print_r($fn_arr); 
?>

Output result:

Array ( [internal] => Array (
                               ...
),
        [user] => Array (
                            [require1.php] => Array ([0] => 'one', [1] =>
'two'),
                            [require2.php] => Array ([0] => 'three', [1]
=> 'four'),
))


-- 
Edit bug report at http://bugs.php.net/?id=46659&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=46659&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=46659&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=46659&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=46659&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=46659&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=46659&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=46659&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=46659&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=46659&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=46659&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=46659&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=46659&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=46659&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=46659&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=46659&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=46659&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=46659&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=46659&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=46659&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=46659&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=46659&r=mysqlcfg

Reply via email to