{"id":77171,"date":"2022-09-18T07:27:55","date_gmt":"2022-09-18T07:27:55","guid":{"rendered":"https:\/\/itsourcecode.com\/?p=77171"},"modified":"2023-11-21T09:10:55","modified_gmt":"2023-11-21T09:10:55","slug":"php-function-guide-with-examples","status":"publish","type":"post","link":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/","title":{"rendered":"PHP Function (Guide With Examples)"},"content":{"rendered":"\n<p>Like other programming languages, PHP has also built-in and user-defined functions that you may explore. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Now, this <strong>PHP function with advanced examples<\/strong> will guide you through the language&#8217;s functions and discover more of your programming skills.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-built-in-functions\"><strong>PHP Built-in Functions<\/strong><\/h2>\n\n\n\n<p><a href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-tutorial-for-beginners-easy-learning-in-php\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP programming<\/a> is a very efficient and effective scripting language with a large number of built-in functions. These built-in functions come with the installation package setup.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Additionally, there are other categories into which the language&#8217;s built-in functions are in. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This is because it has more than <a href=\"https:\/\/www.php.net\/manual\/en\/indexes.functions.php\" target=\"_blank\" rel=\"noreferrer noopener\">1000 built-in functions<\/a> that need to show where they belong in programming.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-user-defined-functions\"><strong>PHP User Defined Functions<\/strong><\/h2>\n\n\n\n<p>The PHP user-defined functions, on the other hand, are the functions from the programmer&#8217;s concept. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>These functions were not based on the language but were created to support the function that is not available in the language&#8217;s package.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Programmers apply user-defined functions to create unique functions in their programs. For this instance, the characteristic of a user-defined function includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is a collection of statements that repeats throughout a program.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This function does not execute automatically when a webpage loads.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Its call to a function will execute the function.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-create-a-user-defined-function-in-php\"><b>Create a User-Defined Function in PHP<\/b><\/h2>\n\n\n\n<p>In this section, you will learn how to create a user-defined function in PHP. But note that the example below varies depending on the kind of function that you want to imply.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-syntax\"><strong>Syntax:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>SampleFunction FunctionName() {\n  code for the user-defined function;\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Remember that the first character of a function name must be a letter or an underscore. However, the function names are case-insensitive.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example<\/strong>:<\/h3>\n\n\n\n<p>In this example, we will try to create a user-defined function named &#8220;<mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>Mytxt()<\/code><\/mark>&#8220;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;head&gt;\n\t&lt;title&gt;&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n\n&lt;?php\nfunction Mytxt() {\n  echo \"Welcome to ITSourceCode.com!\";\n}\nMytxt(); \/\/ call the function\n?&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-output\"><strong>Output:<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-with-Advanced-Example-Mytxt.php-Output.png\"><img loading=\"lazy\" decoding=\"async\" width=\"709\" height=\"104\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-with-Advanced-Example-Mytxt.php-Output.png\" alt=\"PHP Function with Advanced Example - Mytxt.php Output\" class=\"wp-image-77388\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-with-Advanced-Example-Mytxt.php-Output.png 709w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-with-Advanced-Example-Mytxt.php-Output-300x44.png 300w\" sizes=\"auto, (max-width: 709px) 100vw, 709px\" \/><\/a><figcaption class=\"wp-element-caption\"><em>User-defined Function &#8211; Output<\/em><\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p>The sample function <mark style=\"background-color:var(--base);color:#ff0000\" class=\"has-inline-color\"><code>Mytxt()<\/code><\/mark> implements its scope within the open and closed curly braces (<mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>{ function; }<\/code><\/mark>). <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>As seen in the output, the function displays the text containing &#8220;<mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>Welcome to ITSourceCode!<\/code><\/mark>&#8220;.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-function-arguments\"><strong>PHP Function Arguments<\/strong><\/h2>\n\n\n\n<p>In PHP, arguments are similar to variables and they often pass through value. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This indicates that a copy of the value is available within the function, while the variable given to the function is unchangeable. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In addition, arguments are present within parentheses following the function name. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>You may include as many arguments as you like, but you must separate them with commas.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n&lt;body&gt;\n\n&lt;?php\nfunction Country($cityName) {\n  echo \"$cityName Philippines&lt;br&gt;\";\n}\n\nCountry(\"Pasig City,\");\nCountry(\"Bacolod City,\");\nCountry(\"Manila City,\");\nCountry(\"Baguio City,\");\nCountry(\"Davao City,\");\n?&gt;\n\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-output-0\"><strong>Output:<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Arguments-Output.png\"><img loading=\"lazy\" decoding=\"async\" width=\"787\" height=\"182\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Arguments-Output.png\" alt=\"PHP Function Arguments - Output\" class=\"wp-image-77402\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Arguments-Output.png 787w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Arguments-Output-300x69.png 300w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Arguments-Output-768x178.png 768w\" sizes=\"auto, (max-width: 787px) 100vw, 787px\" \/><\/a><figcaption class=\"wp-element-caption\"><em><strong>Hypertext Preprocessor<\/strong> Arguments &#8211; Output<\/em><\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>To explain the scenario, when we call the <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>Country()<\/code><\/mark> method, it also takes a corresponding <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$cityName<\/code><\/mark> as it was assigned as the function&#8217;s parameter. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$cityName<\/code><\/mark> is the basis of the code to create a list of different city names with the same country name.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-is-a-loosely-typed-language\"><strong>PHP is a Loosely Typed Language<\/strong><\/h2>\n\n\n\n<p>PHP is different from other scripting languages in that it doesn&#8217;t have strict rules about how code should be written.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>However, based on the value of the variable, PHP automatically assigns a data type to it. Since the data types are not strictly defined, it is possible to add a string to an integer without running into problems.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Type declarations, however, were included in PHP 7. Including the <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>strict<\/code><\/mark> declaration will cause it to throw a &#8220;<mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>Fatal Error<\/code><\/mark>&#8221; if the data types don&#8217;t match.<\/p>\n\n\n\n<p>Now, the example below will try to call the function without using <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>strict<\/code><\/mark> while passing both an integer and a string:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example\"><strong>Example:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfunction AddNum(int $x, int $y) {\n  return $x + $y;\n}\necho AddNum(10, \"4\"); \n?&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-output-1\"><strong>Output:<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-is-a-Loosely-Typed-Language-Output-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"692\" height=\"103\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-is-a-Loosely-Typed-Language-Output-1.png\" alt=\"PHP is a Loosely Typed Language -Output\" class=\"wp-image-77409\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-is-a-Loosely-Typed-Language-Output-1.png 692w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-is-a-Loosely-Typed-Language-Output-1-300x45.png 300w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/a><figcaption class=\"wp-element-caption\"><em>PHP is a Loosely Typed Language -Output<\/em><\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p>The example program has two variable integers which are the <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$x<\/code><\/mark> and <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$y<\/code><\/mark>, and it should return the sum of the two variables through the <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>return $x + $y; function<\/code><\/mark>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The output proves that the program can still perform the addition function even if the other variable value is a string.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-default-argument-value\"><strong>PHP Default Argument Value<\/strong><\/h2>\n\n\n\n<p>In PHP, a value specified in the function declaration serves as the default argument. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>If the caller function doesn&#8217;t supply a value for the argument, the compiler will automatically assign the default. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Moreover, the default value is overridden if the calling function has an assigned value.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Let us demonstrate the implementation of the PHP default argument value in the example below.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-0\"><strong>Example:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfunction setTime($time = \"05:00\") {\n  echo \"The time is : $time &lt;br&gt;\";\n}\nsetTime();\nsetTime(\"05:15\");\nsetTime(\"05:30\");\n?&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Output:<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Default-Argument-Value-Example-Output.png\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"142\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Default-Argument-Value-Example-Output.png\" alt=\"PHP Default Argument Value - Example Output\" class=\"wp-image-77419\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Default-Argument-Value-Example-Output.png 442w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Default-Argument-Value-Example-Output-300x96.png 300w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/a><figcaption class=\"wp-element-caption\"><em>PHP Default Argument Value &#8211; Example Output<\/em><\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p>The example clarifies how the PHP program implements the default argument value. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>As seen in the program, it assigns <code><mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\">\"05:00\"<\/mark><\/code> as the default value of the argument <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$time<\/code><\/mark>. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>But the other calling functions such as <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>setTime(\"05:15\");<\/code><\/mark> and <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>setTime(\"05:30\");<\/code><\/mark> has their argument values which override the assigned default value.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-functions-returning-values\"><strong>PHP Functions &#8211; Returning values<\/strong><\/h2>\n\n\n\n<p>PHP&#8217;s return keyword effectively terminates a function. Sometimes, this keyword utilizes the result of an argument as the function&#8217;s return value. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>If the return is applied outside of the function, it will terminate the PHP code file from running.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfunction trySum(int $a, int $b) {\n  \t$c = $a + $b;\n  \treturn $c;\n}echo \"The sum of 3 and 9 is: \" . trySum(3,9) . \"&lt;br&gt;\";\necho \"The sum of 10 and 4 is: \" . trySum(10,4) . \"&lt;br&gt;\";\necho \"The sum of 12 and 7 is: \" . trySum(12,7);\n?&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Output:<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Functions-Returning-Values-Example-Output.png\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"147\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Functions-Returning-Values-Example-Output.png\" alt=\"PHP Functions - Returning Values Example Output\" class=\"wp-image-77425\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Functions-Returning-Values-Example-Output.png 486w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Functions-Returning-Values-Example-Output-300x91.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/a><figcaption class=\"wp-element-caption\"><em><strong>Hypertext Preprocessor<\/strong> &#8211; Returning Values Example Output<\/em><\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p>This example shows that the return keyword returns the value of the variable <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$c<\/code><\/mark> it is the sum of the arguments <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$a<\/code><\/mark> and <mark style=\"background-color:var(--base-3);color:#ff0000\" class=\"has-inline-color\"><code>$b<\/code><\/mark>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-php-return-type-declarations\"><strong>PHP Return Type Declarations<\/strong><\/h2>\n\n\n\n<p>This time, let us use the PHP return for type declarations and the example below will demonstrate how this method works. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Example:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfunction addNumbers(float $a, float $b) : float {\n  return $a + $b;\n}\necho addNumbers(12.8, 1.2); \n?&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-output-2\"><strong>Output:<\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Return-Type-Declarations-Example-Output.png\"><img loading=\"lazy\" decoding=\"async\" width=\"493\" height=\"116\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Return-Type-Declarations-Example-Output.png\" alt=\"PHP Function - Return Type Declarations Example Output\" class=\"wp-image-77429\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Return-Type-Declarations-Example-Output.png 493w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Function-Return-Type-Declarations-Example-Output-300x71.png 300w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/a><figcaption class=\"wp-element-caption\"><em><strong>Hypertext Preprocessor<\/strong> &#8211; Return Type Declarations Example Output<\/em><\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p>The return statement in PHP 7 also supports Type Declarations.&nbsp;When defining the function, place the type declaration just before the initial curly bracket ({), followed by a colon (:).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-passing-arguments-by-reference\"><strong>Passing Arguments by Reference<\/strong><\/h2>\n\n\n\n<p>Another PHP function is the passing of arguments by reference and in this section, we will have an example of that.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-1\"><strong>Example:<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfunction addInteger(&amp;$sum) {\n  $sum += 5;\n}\n$int = 11;\naddInteger($int);\necho $int;\n?&gt;<\/code><\/pre>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Funstion-Passing-Arguments-by-Reference.png\"><img loading=\"lazy\" decoding=\"async\" width=\"422\" height=\"104\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Funstion-Passing-Arguments-by-Reference.png\" alt=\"PHP Function - Passing Arguments by Reference\" class=\"wp-image-77432\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Funstion-Passing-Arguments-by-Reference.png 422w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/PHP-Funstion-Passing-Arguments-by-Reference-300x74.png 300w\" sizes=\"auto, (max-width: 422px) 100vw, 422px\" \/><\/a><figcaption class=\"wp-element-caption\"><em><strong>Hypertext Preprocessor<\/strong> &#8211; Passing Arguments by Reference<\/em><\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Program Explanation:<\/strong><\/p>\n\n\n\n<p>The &amp; (ampersand) symbol inserted before the variable parameter is used to pass an argument by reference, implementing a PHP function.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-frequently-ask-questions-faqs\"><strong>Frequently Ask Questions (FAQs)<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-are-php-functions\"><strong>What are PHP functions?<\/strong><\/h3>\n\n\n\n<p>A function is a collection of statements that can be utilized several times within a program. <\/p>\n\n\n\n<p>This will not be automatically executed when a webpage loads. A call to a function will execute the function.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-a-php-function-example\"><strong>What is a PHP function example?<\/strong><\/h3>\n\n\n\n<p>A function is a piece of code that accepts an additional input in the form of a parameter, processes it, and returns a value. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This functionality is a piece of code that can be used more than once, and it takes a list of parameters and returns a value.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-are-the-types-of-functions-in-php\"><strong>What are the types of functions in PHP?<\/strong><\/h3>\n\n\n\n<p>There are two types of functions in the PHP programming language:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Built-in Functions<\/li>\n\n\n\n<li>User-defined Functions<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-is-the-function-name-in-php\"><strong>What is the function name in PHP?<\/strong><\/h3>\n\n\n\n<p>Function names must follow rules when implemented in the program. The name must start with a letter or an underscore and not with numeral figures.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-related-articles\"><strong>Related Articles<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-session-function-start-and-destroy\/\">PHP Session Function (Start and Destroy)<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-anonymous-functions-with-example-programs\/\">PHP Anonymous Functions with Example Programs<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-chmod-dir-function-with-examples\/\">PHP Chmod Dir Function With Examples<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-glob-function-with-examples\/\">PHP Glob() Function With Examples<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-unlink-function-with-example-program\/\">PHP Unlink Function With Example Program<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Summary<\/strong><\/h2>\n\n\n\n<p>In summary, this discussion has covered all the details that you need to understand functions in PHP. <\/p>\n\n\n\n<p>It is also provided with advanced examples to demonstrate the different kinds of potential functions that you may find in the language.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Like other programming languages, PHP has also built-in and user-defined functions that you may explore. Now, this PHP function with advanced examples will guide you through the language&#8217;s functions and &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"PHP Function (Guide With Examples)\" class=\"read-more button\" href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#more-77171\" aria-label=\"Read more about PHP Function (Guide With Examples)\">Read more<\/a><\/p>\n","protected":false},"author":1817,"featured_media":77206,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61035],"tags":[95177,95178,95179],"class_list":["post-77171","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php-tutorial","tag-learn-the-different-php-functions","tag-what-are-php-built-in-function","tag-what-are-php-user-defined-functions","resize-featured-image"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PHP Function (Guide With Examples)<\/title>\n<meta name=\"description\" content=\"Master PHP by learning the PHP functions, their different types and application with this PHP Function full discussion with advanced examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Function (Guide With Examples)\" \/>\n<meta property=\"og:description\" content=\"Master PHP by learning the PHP functions, their different types and application with this PHP Function full discussion with advanced examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"Itsourcecode.com\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/grace.patulada.75\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-18T07:27:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-21T09:10:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/php-function-with-advanced-example.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1460\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nym\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nym\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/\"},\"author\":{\"name\":\"Nym\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/a90428bb6bc54609de724e235c6c81d8\"},\"headline\":\"PHP Function (Guide With Examples)\",\"datePublished\":\"2022-09-18T07:27:55+00:00\",\"dateModified\":\"2023-11-21T09:10:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/\"},\"wordCount\":1129,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\"},\"image\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/php-function-with-advanced-example.png\",\"keywords\":[\"learn the different PHP functions\",\"what are PHP built-in function\",\"what are PHP user-defined functions.\"],\"articleSection\":[\"PHP Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/\",\"name\":\"PHP Function (Guide With Examples)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/php-function-with-advanced-example.png\",\"datePublished\":\"2022-09-18T07:27:55+00:00\",\"dateModified\":\"2023-11-21T09:10:55+00:00\",\"description\":\"Master PHP by learning the PHP functions, their different types and application with this PHP Function full discussion with advanced examples\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#primaryimage\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/php-function-with-advanced-example.png\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/php-function-with-advanced-example.png\",\"width\":1460,\"height\":900,\"caption\":\"PHP Function with Advanced Example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/php-tutorial\\\/php-function-guide-with-examples\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/itsourcecode.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Function (Guide With Examples)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#website\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/\",\"name\":\"Itsourcecode.com\",\"description\":\"Partner In Your Coding Journey!\",\"publisher\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/itsourcecode.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\",\"name\":\"itsourcecode\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"width\":409,\"height\":409,\"caption\":\"itsourcecode\"},\"logo\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\"},\"description\":\"Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!\",\"sameAs\":[\"https:\\\/\\\/itsourcecode.com\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/a90428bb6bc54609de724e235c6c81d8\",\"name\":\"Nym\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/42d30861867f33a159ad6834c7962ba9.jpg?ver=1776428711\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/42d30861867f33a159ad6834c7962ba9.jpg?ver=1776428711\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/42d30861867f33a159ad6834c7962ba9.jpg?ver=1776428711\",\"caption\":\"Nym\"},\"description\":\"Hi itsourcecoders! I am Mary Grace Patulada, a student in Carlos Hilado Memorial State College in Binalbagan Campus.\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/grace.patulada.75\"],\"url\":\"https:\\\/\\\/itsourcecode.com\\\/author\\\/gracepatulada\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PHP Function (Guide With Examples)","description":"Master PHP by learning the PHP functions, their different types and application with this PHP Function full discussion with advanced examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"PHP Function (Guide With Examples)","og_description":"Master PHP by learning the PHP functions, their different types and application with this PHP Function full discussion with advanced examples","og_url":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/","og_site_name":"Itsourcecode.com","article_author":"https:\/\/www.facebook.com\/grace.patulada.75","article_published_time":"2022-09-18T07:27:55+00:00","article_modified_time":"2023-11-21T09:10:55+00:00","og_image":[{"width":1460,"height":900,"url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/php-function-with-advanced-example.png","type":"image\/png"}],"author":"Nym","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Nym","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#article","isPartOf":{"@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/"},"author":{"name":"Nym","@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/a90428bb6bc54609de724e235c6c81d8"},"headline":"PHP Function (Guide With Examples)","datePublished":"2022-09-18T07:27:55+00:00","dateModified":"2023-11-21T09:10:55+00:00","mainEntityOfPage":{"@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/"},"wordCount":1129,"commentCount":0,"publisher":{"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc"},"image":{"@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/php-function-with-advanced-example.png","keywords":["learn the different PHP functions","what are PHP built-in function","what are PHP user-defined functions."],"articleSection":["PHP Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/","url":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/","name":"PHP Function (Guide With Examples)","isPartOf":{"@id":"https:\/\/itsourcecode.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/php-function-with-advanced-example.png","datePublished":"2022-09-18T07:27:55+00:00","dateModified":"2023-11-21T09:10:55+00:00","description":"Master PHP by learning the PHP functions, their different types and application with this PHP Function full discussion with advanced examples","breadcrumb":{"@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#primaryimage","url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/php-function-with-advanced-example.png","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/09\/php-function-with-advanced-example.png","width":1460,"height":900,"caption":"PHP Function with Advanced Example"},{"@type":"BreadcrumbList","@id":"https:\/\/itsourcecode.com\/php-tutorial\/php-function-guide-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsourcecode.com\/"},{"@type":"ListItem","position":2,"name":"PHP Function (Guide With Examples)"}]},{"@type":"WebSite","@id":"https:\/\/itsourcecode.com\/#website","url":"https:\/\/itsourcecode.com\/","name":"Itsourcecode.com","description":"Partner In Your Coding Journey!","publisher":{"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsourcecode.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc","name":"itsourcecode","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","width":409,"height":409,"caption":"itsourcecode"},"logo":{"@id":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg"},"description":"Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!","sameAs":["https:\/\/itsourcecode.com\/"]},{"@type":"Person","@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/a90428bb6bc54609de724e235c6c81d8","name":"Nym","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/42d30861867f33a159ad6834c7962ba9.jpg?ver=1776428711","url":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/42d30861867f33a159ad6834c7962ba9.jpg?ver=1776428711","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/42d30861867f33a159ad6834c7962ba9.jpg?ver=1776428711","caption":"Nym"},"description":"Hi itsourcecoders! I am Mary Grace Patulada, a student in Carlos Hilado Memorial State College in Binalbagan Campus.","sameAs":["https:\/\/www.facebook.com\/grace.patulada.75"],"url":"https:\/\/itsourcecode.com\/author\/gracepatulada\/"}]}},"_links":{"self":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/77171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/users\/1817"}],"replies":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/comments?post=77171"}],"version-history":[{"count":23,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/77171\/revisions"}],"predecessor-version":[{"id":120577,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/77171\/revisions\/120577"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/media\/77206"}],"wp:attachment":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/media?parent=77171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/categories?post=77171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/tags?post=77171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}