0

Does anybody know where I can find a list of all PHP functions? Preferably in an XML file?

The PHP function list is documented on the PHP.net web site however skimming the data off there seems pointless, and I need to know crucial information like return value and parameter type.

What I am trying to do is populate an iPhone application with the list of PHP functions, their return values and their parameter lists. The application then asks questions and expects correct answers.

All help greatly appreciated.

youdsmedia
  • 334
  • 6
  • 15
  • This seems like a valid question with valid answers. Why on-hold? Voting to re-open. – nl-x Apr 21 '15 at 11:16
  • Pretty annoyed at my question being on hold like this. Developers of PHP should be up in arms!!! We need to access the PHP manual in ways other than through php.net. lololol Please reconsider. – youdsmedia Apr 22 '15 at 07:34
  • Similar / Possible duplicate to recent (and off-topic voted) [Where can I find the doc of all standard php functions in XML?](http://stackoverflow.com/q/29727839/367456) - Similar to that question, the question here shows very little research effort. Just saying, in case you wonder that it got closed. – hakre Apr 25 '15 at 11:58
  • And not to state the obvious here: The PHP manual is available as source files in XML format. You can just download it. – hakre Apr 25 '15 at 12:00

2 Answers2

2

How about this?

<?php
$arr = get_defined_functions()["internal"];
$xml = '<?xml version="1.0"?><root>';
foreach( $arr as $key => $value ){
  $xml .= '<function>' . $value . '</function>' . "\r\n";
}
$xml .= '</root>';
echo $xml;
?>
Octfx
  • 691
  • 1
  • 7
  • 18
1

You can write a PHP script that calls get_defined_functions() and use for example PHP's XMLWriter to write the results to an XML file.

Jeroen Noten
  • 3,574
  • 1
  • 17
  • 25