Articles related to the keyword Functions.

Usefull functions to get started with WordPress

WordPress, provides us with many usefull functions, that make our lives easier, and by which, we can customize or create new themes rapidly.

If you haven’t visited the official WordPress functions referance page, then do it and don’t get overwhelmed. After reading it more closely, you will find out that this is a very usefull recource for you to learn in depth WordPress.

Continue reading “Usefull functions to get started with WordPress”

0

PHP functions mini guide

Any valid PHP code may appear inside a function even other function and class definitions.
The function name must start with any letter or underscore followed by digits, letters, underscores. They are case insensitive.
Funcs need not to be defined before they are referenced, except when a function is conditionally defined.
PHP does not support function overloadind, nor it is possible to undefine or redifine previously-declared functions.
func_num_args() , func_get_arg() , func_get_args()
All functions and classes have the global scope.
It is possible to call recursive functions

function foo(){
   function bar(){
      echo "I don't exist until foo() is called. \n";    
   }
}


function recursion($a){
   if($a < 20){
      echo "$a\n";
      recursion($a+1);
   }
}

Continue reading “PHP functions mini guide”

0