PHP Function: A operate could be a block of code written during a program to perform some specific task. defined perform is re-usable. It reduces the time and effort of repetition one code. If something code needs to be modified, we {will|we can} easily modification within a function the changes will reflect anyplace we tend to decision the function.
Types of Functions in PHP 1. Built-in: These functions are already coded and keep in the sort of functions. we tend to simply have to be compelled to decision them as per our demand. for ex:- print_r(), 2. User-defined: PHP allows us to have an outlined function known as the user-defined function. exploitation this we can create our block of code and use it simply anywhere by calling it. however, will we tend to declare own function; syntax, function function_name() How many forms of user-defined function: i) return type ii) Parameterized type iii) come back and parameterized a type PHP Classes/Objects: Is is technologist defined information sort and class is a collection of objects. the category could be a collection of objects and object store it's properties and behavior. It contains class objects and performance that perform a block of code. however, we can declare own class: category class_name Scope of classes in PHP 1. Public: There strategies and properties are accessible anywhere (outside the class) 2. Private: There strategies and properties only accessed among wherever the class created 3. Protected: strategies and properties are accessed within the class wherever they're declared. PHP Function | Object Oriented Programming | Object Oriented Programming language
0 Comments
Leave a Reply. |
AuthorWisdom Infosoft ArchivesCategories |