About 50,800,000 results
Open links in new tab
  1. PHP Functions - W3Schools

    PHP has over 1000 built-in functions that can be called directly, from within a script, to perform a specific task. Please check out our PHP reference for a complete overview of the PHP built-in functions. Besides the built-in PHP functions, it is possible to create your own functions.

  2. How to Define and Call a Function in PHP - Tutorial Republic

    In this tutorial you will learn how to define and call a custom function in PHP to save the repetition of code and make your code much easier to maintain.

  3. PHP | Functions - GeeksforGeeks

    May 1, 2025 · A function in PHP is a self-contained block of code that performs a specific task. It can accept inputs (parameters), execute a set of statements, and optionally return a value. PHP functions allow code reusability by encapsulating a block of code to perform specific tasks.

  4. PHP: Functions - Manual

    Functions Table of Contents. User-defined functions; Function parameters and arguments; Returning values; Variable functions; Internal (built-in) functions; Anonymous functions; Arrow Functions; First class callable syntax

  5. PHP Functions - PHP Tutorial

    Summary: in this tutorial, you will learn about PHP functions and how to define user-defined functions. A function is a named block of code that performs a specific task. So far, you have learned how to use built-in functions in PHP, such as var_dump() that dumps information about a …

  6. How To Use Functions in PHP - DigitalOcean

    Mar 1, 2022 · In this tutorial, you will work with all the different pieces of a function, so that you can use functions in the best way to solve your challenge. We will start by writing user-defined functions.

  7. PHP: User-defined functions - Manual

    A function is defined using the function keyword, a name, a list of parameters (which might be empty) seperated by commas (,) enclosed in parentheses, followed by the body of the function enclosed in curly braces, such as the following: echo "Example function.\n"; return $retval; Note:

  8. PHP Functions: Creating, Calling, and Reusing Code - Reintech

    Apr 28, 2023 · In this tutorial, you will learn about PHP functions, how to create them, call them, and how to reuse your code efficiently. Functions are an essential part of any programming language as they allow you to write reusable code and …

  9. Functions in PHP: Lesson with Examples

    Apr 12, 2022 · In this lesson, we will get acquainted with such a concept as functions in the PHP language. Functions are pretty simple things. It is a piece of code that takes certain parameters and returns some result at the output. It is possible to …

  10. How to define and call functions in PHP - Sling Academy

    Jan 9, 2024 · This tutorial covers the essentials of defining and calling functions in PHP, with progressive examples designed to elevate your coding skills. What Are Functions in PHP? Functions in PHP are blocks of code that encapsulate specific tasks, and can be reused throughout your application.

  11. Some results have been removed
Refresh