{"id":262340,"date":"2020-08-05T15:08:48","date_gmt":"2020-08-05T15:08:48","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=262340"},"modified":"2020-08-06T05:50:13","modified_gmt":"2020-08-06T05:50:13","slug":"php-scalar-and-return-declarations","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/","title":{"rendered":"PHP Scalar and Return type Declarations"},"content":{"rendered":"\n<p>Hey, if you are looking into PHP scalar or return type declarations then you must read this post. These are the features that were introduced in PHP 7<\/p>\n\n\n\n<p>Now let&#8217;s look closely with examples.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scalar\"><strong>Scalar Type Declarations<\/strong><\/h2>\n\n\n\n<p>This type of declaration has two options coercive (default mode) and strict<\/p>\n\n\n\n<p><strong>Coercive mode:<\/strong> it&#8217;s a default mode<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nclass Customer {\n  private $balance = 0;\n\n  public function setWalletBalance(int ...$values) {\n    $this-&gt;balance = array_sum($values);\n  }\n\n  public function getWalletBalance() {\n    return $this-&gt;balance;\n  }\n}\n$customer = new Customer();\n$registration_reward = &quot;1000&quot;;\n$newsletter_reward = 100;\n\n$customer-&gt;setWalletBalance($registration_reward, $newsletter_reward);\n\necho &quot;My total balance is &quot; . $customer-&gt;getWalletBalance();<\/pre>\n\n\n\n<p>In the above example, it&#8217;s just a simple customer class and method <strong>setWalletBalance()<\/strong> uses scalar type declaration which will accept any number of values then make a sum and then set to property balance.<\/p>\n\n\n\n<p>If you just look into variables <strong>$registration_reward<\/strong> and <strong>$newsletter_reward<\/strong> have different data types so in coercive \/ default mode the program will output <strong>&#8220;My total balance is 1100&#8221; <\/strong>without any error.<\/p>\n\n\n\n<amp-fit-text layout=\"fixed-height\" min-font-size=\"6\" max-font-size=\"72\" height=\"80\"><p><strong>strict mode<\/strong><\/p><\/amp-fit-text>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\ndeclare(strict_types=1);\nclass Customer {\n  private $balance = 0;\n\n  public function setWalletBalance(int ...$values) {\n    $this-&gt;balance = array_sum($values);\n  }\n\n  public function getWalletBalance() {\n    return $this-&gt;balance;\n  }\n}\n$customer = new Customer();\n$registration_reward = &quot;1000&quot;;\n$newsletter_reward = 100;\n\n$customer-&gt;setWalletBalance($registration_reward, $newsletter_reward);\n\necho &quot;My total balance is &quot; . $customer-&gt;getWalletBalance();<\/pre>\n\n\n\n<p>In the above example, I just enabled strict mode on the very first line of my program so now you will get a fatal<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Return Type Declarations<\/strong><\/h2>\n\n\n\n<p>It specifies the type of value which will be returned from a function<\/p>\n\n\n\n<p><strong>Default behavior: <\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nclass Customer {\n  private $address = &#039;&#039;;\n\n  public function setAddress(string ...$values) {\n    $this-&gt;address = implode(&quot;\\n&quot;, $values);\n  }\n\n  public function hasAddress() : bool {\n    return $this-&gt;address;\n  }\n\n  public function getAddress() : string {\n    return $this-&gt;address;\n  }\n}\n$customer = new Customer();\n$name = &quot;John Doe&quot;;\n$address = &quot;Webkul arv park&quot;;\n$city = &quot;Noida&quot;;\n$zone = &quot;Uttar Pradesh&quot;;\n$country = &quot;India&quot;;\n$customer-&gt;setAddress($name, $address, $city, $zone, $country);\n\nif($customer-&gt;hasAddress()) {\n  echo &quot;My address is &quot; . &quot;&lt;pre&gt;&quot; . $customer-&gt;getAddress() . &quot;&lt;\/pre&gt;&quot;;\n} else {\n  echo &quot;No address found&quot;;\n}<\/pre>\n\n\n\n<p>In the above example, I am just adding multiple values for an address using the <a href=\"#scalar\">scalar declaration<\/a> as we looked into the previous example. <\/p>\n\n\n\n<p>For method <strong>hasAddress()<\/strong>, it will return boolean value because the return type is bool but without any error then program output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"814\" height=\"158\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png\" alt=\"output\" class=\"wp-image-262359\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png 814w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output-300x58.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output-250x49.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output-768x149.png 768w\" sizes=\"(max-width: 814px) 100vw, 814px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p> <\/p>\n\n\n\n<p><strong>Strict mode: <\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\ndeclare(strict_types=1);\nclass Customer {\n  private $address = &#039;&#039;;\n\n  public function setAddress(string ...$values) {\n    $this-&gt;address = implode(&quot;\\n&quot;, $values);\n  }\n\n  public function hasAddress() : bool {\n    return $this-&gt;address;\n  }\n\n  public function getAddress() : string {\n    return $this-&gt;address;\n  }\n}\n$customer = new Customer();\n$name = &quot;John Doe&quot;;\n$address = &quot;Webkul arv park&quot;;\n$city = &quot;Noida&quot;;\n$zone = &quot;Uttar Pradesh&quot;;\n$country = &quot;India&quot;;\n$customer-&gt;setAddress($name, $address, $city, $zone, $country);\n\nif($customer-&gt;hasAddress()) {\n  echo &quot;My address is &quot; . &quot;&lt;pre&gt;&quot; . $customer-&gt;getAddress() . &quot;&lt;\/pre&gt;&quot;;\n} else {\n  echo &quot;No address found&quot;;\n}<\/pre>\n\n\n\n<p>If you enable the strict mode as I did in the above example at the very first line of my program then it will give a fatal because <strong>hasAddress<\/strong>() method is set to return only boolean value and address property has the string value<\/p>\n\n\n\n<p>That&#8217;s it for this post, I hope it was helpful for you. visit more blogs <a href=\"https:\/\/webkul.com\/blog\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> and check other PHP 7 features on the official site <a href=\"https:\/\/www.php.net\/manual\/en\/migration70.new-features.php\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>. <\/p>\n\n\n\n<p>If you have any query then ask in the comment section. Thanks<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, if you are looking into PHP scalar or return type declarations then you must read this post. These are the features that were introduced in PHP 7 Now let&#8217;s look closely with examples. Scalar Type Declarations This type of declaration has two options coercive (default mode) and strict Coercive mode: it&#8217;s a default mode <a href=\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":224,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[305,13,1],"tags":[2057],"class_list":["post-262340","post","type-post","status-publish","format-standard","hentry","category-opencart","category-php","category-uncategorized","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Scalar and Return type Declarations - Webkul Blog<\/title>\n<meta name=\"description\" content=\"PHP 7 features Scalar and Return type declarations which includes very simple examples to understand quickly\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Scalar and Return type Declarations - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"PHP 7 features Scalar and Return type declarations which includes very simple examples to understand quickly\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-05T15:08:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-06T05:50:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png\" \/>\n<meta name=\"author\" content=\"Prabhat Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prabhat Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\"},\"author\":{\"name\":\"Prabhat Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/50845eb980b8da8dea2def8904ec5566\"},\"headline\":\"PHP Scalar and Return type Declarations\",\"datePublished\":\"2020-08-05T15:08:48+00:00\",\"dateModified\":\"2020-08-06T05:50:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\"},\"wordCount\":298,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png\",\"keywords\":[\"PHP\"],\"articleSection\":[\"opencart\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\",\"url\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\",\"name\":\"PHP Scalar and Return type Declarations - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png\",\"datePublished\":\"2020-08-05T15:08:48+00:00\",\"dateModified\":\"2020-08-06T05:50:13+00:00\",\"description\":\"PHP 7 features Scalar and Return type declarations which includes very simple examples to understand quickly\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png\",\"width\":814,\"height\":158,\"caption\":\"output\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Scalar and Return type Declarations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/50845eb980b8da8dea2def8904ec5566\",\"name\":\"Prabhat Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/dbb1bb221277f0b032626ee13cc25b7fc46c2271db1bdf289ecd45f9dc7bfc06?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/dbb1bb221277f0b032626ee13cc25b7fc46c2271db1bdf289ecd45f9dc7bfc06?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Prabhat Kumar\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/prabhatkumar-oc082\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Scalar and Return type Declarations - Webkul Blog","description":"PHP 7 features Scalar and Return type declarations which includes very simple examples to understand quickly","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:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/","og_locale":"en_US","og_type":"article","og_title":"PHP Scalar and Return type Declarations - Webkul Blog","og_description":"PHP 7 features Scalar and Return type declarations which includes very simple examples to understand quickly","og_url":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2020-08-05T15:08:48+00:00","article_modified_time":"2020-08-06T05:50:13+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png","type":"","width":"","height":""}],"author":"Prabhat Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Prabhat Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/"},"author":{"name":"Prabhat Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/50845eb980b8da8dea2def8904ec5566"},"headline":"PHP Scalar and Return type Declarations","datePublished":"2020-08-05T15:08:48+00:00","dateModified":"2020-08-06T05:50:13+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/"},"wordCount":298,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png","keywords":["PHP"],"articleSection":["opencart","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/","url":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/","name":"PHP Scalar and Return type Declarations - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png","datePublished":"2020-08-05T15:08:48+00:00","dateModified":"2020-08-06T05:50:13+00:00","description":"PHP 7 features Scalar and Return type declarations which includes very simple examples to understand quickly","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2020\/08\/output.png","width":814,"height":158,"caption":"output"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/php-scalar-and-return-declarations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP Scalar and Return type Declarations"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/50845eb980b8da8dea2def8904ec5566","name":"Prabhat Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/dbb1bb221277f0b032626ee13cc25b7fc46c2271db1bdf289ecd45f9dc7bfc06?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dbb1bb221277f0b032626ee13cc25b7fc46c2271db1bdf289ecd45f9dc7bfc06?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Prabhat Kumar"},"url":"https:\/\/webkul.com\/blog\/author\/prabhatkumar-oc082\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/262340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/224"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=262340"}],"version-history":[{"count":13,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/262340\/revisions"}],"predecessor-version":[{"id":262375,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/262340\/revisions\/262375"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=262340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=262340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=262340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}