From the course: Learning PHP
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using built-in functions
- PHP has an extensive library of functions to help us complete certain actions more efficiently. You saw it with the size of function earlier, without that function, we'd have to write our own much more resource, heavy way to get the number of elements in an array. But how do you find these built in functions? A good starting place is the phpmanual@php.net. They will have an extensive list of functions and how they work. They'll also have additional comments from users on some things to think about as you use them. However, there are a few caveats, the search isn't great. If you don't already know the functions name. So if I were to search array size here, I would get a list of functions with the words array, but I wouldn't get the size of function. This is also developers talking to developers. So you'll get sample code, but not necessarily extensive explanation. Another good tool for using PHP functions is an IDE with…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
What are functions?5m 11s
-
(Locked)
Using built-in functions4m 40s
-
(Locked)
Writing custom functions7m 10s
-
(Locked)
Union typing variables2m
-
(Locked)
Optional or named arguments5m 23s
-
(Locked)
Anonymous functions4m 32s
-
(Locked)
What are objects and classes?3m 21s
-
(Locked)
Defining a simple person class (update for PHP 8.0)3m 19s
-
(Locked)
Using the person class3m 25s
-
(Locked)
Challenge: Sort an array of objects46s
-
(Locked)
Solution: Sort an array of objects3m 26s
-
-
-
-
-
-