{"id":471,"date":"2021-03-17T09:17:26","date_gmt":"2021-03-17T09:17:26","guid":{"rendered":"https:\/\/phptutorial.net\/?page_id=471"},"modified":"2025-04-06T02:15:20","modified_gmt":"2025-04-06T02:15:20","slug":"php-named-arguments","status":"publish","type":"page","link":"https:\/\/www.phptutorial.net\/php-tutorial\/php-named-arguments\/","title":{"rendered":"PHP Named Arguments"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn about PHP named arguments and how to use them effectively in your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-the-php-named-arguments'>Introduction to the PHP named arguments <a href=\"#introduction-to-the-php-named-arguments\" class=\"anchor\" id=\"introduction-to-the-php-named-arguments\" title=\"Anchor for Introduction to the PHP named arguments\">#<\/a><\/h2>\n\n\n\n<p>Since PHP 8.0, you can use named arguments for functions. The named arguments allow you to pass arguments to a <a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-functions\/\">function<\/a> based on the <a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-function-parameters\/\">parameter names<\/a> rather than the parameter positions.<\/p>\n\n\n\n<p>The following example defines a function that finds the position of the first occurrence of a substring in a string:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">find<\/span><span class=\"hljs-params\">($needle, $haystack)<\/span>\n<\/span>{\n    <span class=\"hljs-keyword\">return<\/span> strpos($haystack, $needle);\n}    <\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To call the <code>find()<\/code> function, you pass the arguments based on the parameter positions like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">find(<span class=\"hljs-string\">'awesome'<\/span>, <span class=\"hljs-string\">'PHP is awesome!'<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this case, <code>$needle<\/code> is <code>'awesome'<\/code> and <code>$haystack<\/code> is <code>'PHP is awesome!'<\/code>.<\/p>\n\n\n\n<p>However, the function call is not so clear. For example, you don&#8217;t know which argument is the needle and which argument is the haystack.<\/p>\n\n\n\n<p>Sometimes, you may accidentally make a mistake by passing the arguments in the wrong order. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">find ( \n    <span class=\"hljs-string\">'PHP is awesome!'<\/span>,\n    <span class=\"hljs-string\">'awesome'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This is buggy and very difficult to troubleshoot.<\/p>\n\n\n\n<p>To avoid this, you may add <a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-comments\/\">comments<\/a> to the arguments like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">find (\n    <span class=\"hljs-string\">'awesome'<\/span>,        <span class=\"hljs-comment\">\/\/ needle<\/span>\n    <span class=\"hljs-string\">'PHP is awesome!'<\/span> <span class=\"hljs-comment\">\/\/ haystack<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The comment makes the code more clear. However, it&#8217;s not robust.<\/p>\n\n\n\n<p>To improve this, PHP 8.0 introduced the named arguments that allow you to specify the parameter names when passing arguments:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">find (\n    needle : <span class=\"hljs-string\">'awesome'<\/span>,\n    haystack : <span class=\"hljs-string\">'PHP is awesome!'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Since you are using the parameter names, the positions are not necessary. For example, you can swap the parameters like this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">find(\n    haystack :<span class=\"hljs-string\">'PHP is awesome!'<\/span>,\n    needle : <span class=\"hljs-string\">'awesome'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It should work correctly.<\/p>\n\n\n\n<p>Here&#8217;s the complete code:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">find<\/span><span class=\"hljs-params\">($needle, $haystack)<\/span>\n<\/span>{\n    <span class=\"hljs-keyword\">return<\/span> strpos($haystack, $needle);\n}    \n\n\n<span class=\"hljs-keyword\">echo<\/span> find (\n    needle : <span class=\"hljs-string\">'awesome'<\/span>,\n    haystack : <span class=\"hljs-string\">'PHP is awesome!'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCmZ1bmN0aW9uIGZpbmQoJG5lZWRsZSwgJGhheXN0YWNrKQp7CiAgICByZXR1cm4gc3RycG9zKCRoYXlzdGFjaywgJG5lZWRsZSk7Cn0gICAgCgoKZWNobyBmaW5kICgKICAgIG5lZWRsZSA6ICdhd2Vzb21lJywKICAgIGhheXN0YWNrIDogJ1BIUCBpcyBhd2Vzb21lIScKKTs\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='skipping-default-arguments'>Skipping default arguments <a href=\"#skipping-default-arguments\" class=\"anchor\" id=\"skipping-default-arguments\" title=\"Anchor for Skipping default arguments\">#<\/a><\/h2>\n\n\n\n<p>The following defines a function that creates an anchor element (<code>&lt;a&gt;<\/code>) from text, href, title, and target:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">create_anchor<\/span><span class=\"hljs-params\">(\n    $text,\n    $href = <span class=\"hljs-string\">'#'<\/span>,\n    $title = <span class=\"hljs-string\">''<\/span>,\n    $target = <span class=\"hljs-string\">'_self'<\/span>\n)<\/span>\n<\/span>{\n    $href = $href ? sprintf(<span class=\"hljs-string\">'href=\"%s\"'<\/span>, $href) : <span class=\"hljs-string\">''<\/span>;\n    $title = $title ? sprintf(<span class=\"hljs-string\">'title=\"%s\"'<\/span>, $title) : <span class=\"hljs-string\">''<\/span>;\n    $target = $target ? sprintf(<span class=\"hljs-string\">'target=\"%s\"'<\/span>, $target) : <span class=\"hljs-string\">''<\/span>;\n\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"&lt;a $href $title $target&gt;$text&lt;\/a&gt;\"<\/span>;\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To create a link with the target is <code>_blank<\/code>, you must specify all the <a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-default-parameters\/\">default arguments<\/a> until the one you want to change. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$link = create_anchor(\n    <span class=\"hljs-string\">'PHP Tutorial'<\/span>, \n    <span class=\"hljs-string\">'https:\/\/phptutorial.net\/'<\/span>,\n    <span class=\"hljs-string\">''<\/span>,\n    <span class=\"hljs-string\">'_blank'<\/span>\n);\n\n<span class=\"hljs-keyword\">echo<\/span> $link;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">&lt;a href=<span class=\"hljs-string\">\"https:\/\/phptutorial.net\/\"<\/span>  target=<span class=\"hljs-string\">\"_blank\"<\/span>&gt;PHP Tutorial&lt;\/a&gt;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, you must pass space (&#8221;) to the third argument. Using the named arguments, you don&#8217;t have to specify all the defaults. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"> $link = create_anchor(\n    text : <span class=\"hljs-string\">'PHP Tutorial'<\/span>, \n    href : <span class=\"hljs-string\">'https:\/\/phptutorial.net\/'<\/span>,\n    target: <span class=\"hljs-string\">'_blank'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Heres&#8217; the complete code:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">create_anchor<\/span><span class=\"hljs-params\">(\n    $text,\n    $href = <span class=\"hljs-string\">'#'<\/span>,\n    $title = <span class=\"hljs-string\">''<\/span>,\n    $target = <span class=\"hljs-string\">'_self'<\/span>\n)<\/span>\n<\/span>{\n    $href = $href ? sprintf(<span class=\"hljs-string\">'href=\"%s\"'<\/span>, $href) : <span class=\"hljs-string\">''<\/span>;\n    $title = $title ? sprintf(<span class=\"hljs-string\">'title=\"%s\"'<\/span>, $title) : <span class=\"hljs-string\">''<\/span>;\n    $target = $target ? sprintf(<span class=\"hljs-string\">'target=\"%s\"'<\/span>, $target) : <span class=\"hljs-string\">''<\/span>;\n\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"&lt;a $href $title $target&gt;$text&lt;\/a&gt;\"<\/span>;\n}\n\n\n $link = create_anchor(\n    text : <span class=\"hljs-string\">'PHP Tutorial'<\/span>, \n    href : <span class=\"hljs-string\">'https:\/\/phptutorial.net\/'<\/span>,\n    target: <span class=\"hljs-string\">'_blank'<\/span>\n);\n\n<span class=\"hljs-keyword\">echo<\/span> $link;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCmZ1bmN0aW9uIGNyZWF0ZV9hbmNob3IoCiAgICAkdGV4dCwKICAgICRocmVmID0gJyMnLAogICAgJHRpdGxlID0gJycsCiAgICAkdGFyZ2V0ID0gJ19zZWxmJwopCnsKICAgICRocmVmID0gJGhyZWYgPyBzcHJpbnRmKCdocmVmPSIlcyInLCAkaHJlZikgOiAnJzsKICAgICR0aXRsZSA9ICR0aXRsZSA_IHNwcmludGYoJ3RpdGxlPSIlcyInLCAkdGl0bGUpIDogJyc7CiAgICAkdGFyZ2V0ID0gJHRhcmdldCA_IHNwcmludGYoJ3RhcmdldD0iJXMiJywgJHRhcmdldCkgOiAnJzsKCiAgICByZXR1cm4gIjxhICRocmVmICR0aXRsZSAkdGFyZ2V0PiR0ZXh0PC9hPiI7Cn0KCgogJGxpbmsgPSBjcmVhdGVfYW5jaG9yKAogICAgdGV4dCA6ICdQSFAgVHV0b3JpYWwnLCAKICAgIGhyZWYgOiAnaHR0cHM6Ly93d3cucGhwdHV0b3JpYWwubmV0LycsCiAgICB0YXJnZXQ6ICdfYmxhbmsnCik7CgplY2hvICRsaW5rOw\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='mixing-named-arguments-with-positional-arguments'>Mixing named arguments with positional arguments <a href=\"#mixing-named-arguments-with-positional-arguments\" class=\"anchor\" id=\"mixing-named-arguments-with-positional-arguments\" title=\"Anchor for Mixing named arguments with positional arguments\">#<\/a><\/h2>\n\n\n\n<p>PHP allows you to call a function using both positional and named arguments. And you need to place the named arguments after positional arguments. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$link = create_anchor(\n    <span class=\"hljs-string\">'PHP Tutorial'<\/span>, \n    <span class=\"hljs-string\">'https:\/\/phptutorial.net\/'<\/span>,\n     target: <span class=\"hljs-string\">'_blank'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>text<\/code> is <code>'PHP Tutorial'<\/code>.<\/li>\n\n\n\n<li>The <code>href<\/code> is <code>'https:\/\/phptutorial.net\/'<\/code>.<\/li>\n\n\n\n<li>And the <code>target<\/code> is <code>'_blank'<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>You&#8217;ll get an error if you place the named arguments before the positional arguments. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">create_anchor(\n    target : <span class=\"hljs-string\">'_blank'<\/span>,\n    <span class=\"hljs-string\">'PHP Tutorial'<\/span>, \n    <span class=\"hljs-string\">'https:\/\/phptutorial.net\/'<\/span>\n);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Error:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">Cannot <span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">positional<\/span> <span class=\"hljs-title\">argument<\/span> <span class=\"hljs-title\">after<\/span> <span class=\"hljs-title\">named<\/span> <span class=\"hljs-title\">argument<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use named arguments to pass arguments to a function based on the parameter names.<\/li>\n\n\n\n<li>Put the named arguments after the positional arguments in function calls.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Did you find this tutorial useful?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"471\"\n\t\t\t\tdata-post-url=\"https:\/\/www.phptutorial.net\/php-tutorial\/php-named-arguments\/\"\n\t\t\t\tdata-post-title=\"PHP Named Arguments\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"471\"\n\t\t\t\tdata-post-url=\"https:\/\/www.phptutorial.net\/php-tutorial\/php-named-arguments\/\"\n\t\t\t\tdata-post-title=\"PHP Named Arguments\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn about PHP named arguments and how to use them effectively in your code.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":15,"menu_order":36,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-471","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/comments?post=471"}],"version-history":[{"count":5,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/471\/revisions"}],"predecessor-version":[{"id":3024,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/471\/revisions\/3024"}],"up":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/15"}],"wp:attachment":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/media?parent=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}