Blog

python tutorials and learn python

Created with Sketch.

PHP empty

PHP empty Summary: in this tutorial, you’ll learn how to use the PHP empty() construct to check if a variable is empty. Introduction to the PHP empty() construct The empty() construct accepts a variable and returns true if the variable is empty. Otherwise, it returns false. empty(mixed $v): bool Code language: PHP (php) A variable…
Read more

PHP isset

PHP isset Summary: in this tutorial, you will learn how to use the PHP isset() construct to check if a variable is set and not null. Introduction to the PHP isset() construct PHP isset() returns true if a variable is set and not null. isset(mixed $var): bool Code language: PHP (php) The isset() is a…
Read more

PHP Variable Functions

PHP Variable Functions Summary: in this tutorial, you will learn about the PHP variable functions and how to use them to call a function, a method of an object, and a class’s static method. Introduction to PHP variable functions Variable functions allow you to use a variable like a function. When you append parentheses ()…
Read more

PHP Arrow Functions

PHP Arrow Functions Summary: in this tutorial, you will learn about PHP arrow functions and how to use them effectively. Introduction to PHP arrow functions PHP 7.4 introduced the arrow functions that provide a more concise syntax for the anonymous functions. The following illustrates the basic syntax for arrow functions: fn (arguments) => expression; Code…
Read more

PHP Anonymous Functions

PHP Anonymous Functions Summary: in this tutorial, you will learn about PHP anonymous functions and how to use them effectively. Introduction to anonymous functions When you define a function, you specify a name for it. Later, you can call the function by its name. For example, to define a function that multiplies two numbers, you…
Read more

PHP uksort

PHP uksort Summary: in this tutorial, you’ll learn how to use the PHP uksort() function to sort an array by keys using a user-defined comparison function. Introduction to the PHP uksort() function The uksort() function allows you to sort an array by key using a user-defined comparison function. Typically, you use the uksort() function to…
Read more

PHP uasort

PHP uasort Summary: in this tutorial, you’ll learn how to use the PHP uasort() function to sort an associative array. Introduction to the PHP uasort() function The uasort() function sorts the elements of an associative array with a user-defined comparison function and maintains the index association. The following shows the syntax of the uasort() function:…
Read more

PHP asort

PHP asort Summary: in this tutorial, you’ll learn how to use the PHP asort() function to sort an associative array and maintain the index association. Introduction to the PHP asort() function The asort() function sorts the elements of an associative array in ascending order. Unlike other sort functions, the asort() function maintains the index association.…
Read more

PHP usort

PHP usort Summary: in this tutorial, you’ll learn how to use the PHP usort() function to sort an array using a user-defined comparison function. Introduction to the PHP usort() function So far, you learned how to sort an array using a built-in comparison operator. For example, when you use the sort() function to sort an…
Read more

PHP ksort

PHP ksort Summary: in this tutorial, you’ll learn how to use the PHP ksort() function to sort the keys of an associative array. Introduction to the PHP ksort() fucntion The ksort() function sorts the elements of an array by their keys. The ksort() is mainly useful for sorting associative arrays. The following shows the syntax…
Read more