note 118213 added to function.get-defined-functions
| From: | MuneebAslam | Date: | Tue, 27 Oct 2015 00:30:53 +0000 |
| Subject: | note 118213 added to function.get-defined-functions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204037@lists.php.net to get a copy of this message | ||
This is rather a simple non-confusing script to get the function names linked to its manual page on
php.net. Hope it helps someone. Commented script is self explainatory
<?php
/*declare a variable to php manual of functions.
change the $lng to the region you want it for,
i-e en/es/de etc etc */
$lng = "es";
$url = "http://www.php.net/manual/".$lng."/function.";
// get defined functions in a variable (it will be a 2D array)
$functions = get_defined_functions();
// Run nested foreach to get the function names
foreach($functions as $function){
foreach ($function as $functionName){
/* Since php manual is using hyphens instead of underscores
for functions, we will convert underscores to hyphen whereever
there is one. */
if(strpos($functionName,"_") !== false){
$functionForURL = str_replace("_","-",$functionName);
} else {
$functionForURL = $functionName;
}
/* echo the link */
echo "<a
href='".$url.$functionForURL.".php'>".$functionName."</a><br
/>";
}
}
?>
----
Server IP: 72.52.91.14
Probable Submitter: 90.170.124.223
----
Manual Page -- http://php.net/manual/en/function.get-defined-functions.php
Edit -- https://master.php.net/note/edit/118213
Del: integrated -- https://master.php.net/note/delete/118213/integrated
Del: useless -- https://master.php.net/note/delete/118213/useless
Del: bad code -- https://master.php.net/note/delete/118213/bad+code
Del: spam -- https://master.php.net/note/delete/118213/spam
Del: non-english -- https://master.php.net/note/delete/118213/non-english
Del: in docs -- https://master.php.net/note/delete/118213/in+docs
Del: other reasons-- https://master.php.net/note/delete/118213
Reject -- https://master.php.net/note/reject/118213
Search -- https://master.php.net/manage/user-notes.php