{"id":1582,"date":"2016-02-01T17:59:19","date_gmt":"2016-02-01T16:59:19","guid":{"rendered":"https:\/\/www.entropywins.wtf\/blog\/?p=1582"},"modified":"2020-08-04T12:53:51","modified_gmt":"2020-08-04T11:53:51","slug":"missing-in-php7-named-parameters","status":"publish","type":"post","link":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/","title":{"rendered":"Missing in PHP7: Named parameters"},"content":{"rendered":"<p>This is the second\u00a0post in my <a href=\"https:\/\/www.entropywins.wtf\/blog\/2016\/01\/30\/missing-in-php7\/\">Missing in PHP7 series<\/a>. The previous one is about\u00a0<a href=\"https:\/\/www.entropywins.wtf\/blog\/2016\/01\/30\/missing-in-php7-function-references\/\">function references<\/a>.<\/p>\n<p><em>2020 update: named parameters will be in PHP 8 since <a href=\"https:\/\/wiki.php.net\/rfc\/named_params\">the RFC<\/a> passed.<\/em><\/p>\n<p>Readability of code is very important, and this is most certainly not readable:<\/p>\n<pre class=\"lang:php decode:true\">getCatPictures( 10, 0, true );<\/pre>\n<p>You can make some guesses, and in a lot of cases you&#8217;ll be passing in named variables.<\/p>\n<pre class=\"lang:php decode:true\">getCatPictures( $limit, $offset, !$includeNonApproved );<\/pre>\n<p>It&#8217;s even possible to create named variables where you would otherwise have none.<\/p>\n<pre class=\"lang:php decode:true\">$limit = 10;\n$offset = 0;\n$approvedPicturesOnly = true;\ngetCatPictures( $limit, $offset, $approvedPicturesOnly );<\/pre>\n<p>This gains you naming of the arguments, at the cost of boilerplate, and worse, the cost of introducing local state. I&#8217;d hate to see such state be introduced even if the function did nothing else, and it only gets worse as the complexity and other state of the function increases.<\/p>\n<p>Another way to improve the situation a little is by making the\u00a0boolean flag more readable via\u00a0usage of constants.<\/p>\n<pre class=\"lang:php decode:true\">getCatPictures( 10, 0, CatPictureRepo::APPROVED_PICTURES_ONLY );<\/pre>\n<p>Of course, long argument lists and boolean flags are both things you want to avoid to begin with and are rarely needed when <a href=\"https:\/\/www.entropywins.wtf\/blog\/2013\/09\/08\/clean-functions\/\">designing your functions well<\/a>. It&#8217;s however not possible to avoid all argument lists. Using the cat pictures example, the limit and offset parameters can not be removed.<\/p>\n<pre class=\"lang:php decode:true\">getApprovedCatPictures( 10, 0 );<\/pre>\n<p>You can create a value object, though this just moves the problem to the constructor of said value object, and unless you create weird function specific value objects, this is only a partial move.<\/p>\n<pre class=\"lang:php decode:true \">getApprovedCatPictures( new LimitOffset( 10, 0 ) );<\/pre>\n<p>An naive\u00a0solution to this problem is to have a single parameter that is an associative array.<\/p>\n<pre class=\"lang:php decode:true\">getApprovedCatPictures( [\n    'limit' =&gt; 10,\n    'offset' =&gt; 0\n] );<\/pre>\n<p>The result of this is catastrophe. You are no longer able to see which parameters are required and supported from the function signature, or what their types are. You need to look at the implementation, where you are also forced to do a lot of checks before doing the actual job of the function. So many checks that they probably deserve their own function. Yay, recursion!\u00a0Furthermore,\u00a0static code analysis gets thrown out of the window, making it next to impossible\u00a0for tools to assist with renaming a parameter or finding its usages.<\/p>\n<p>What I&#8217;d like to be able to do is <a href=\"https:\/\/en.wikipedia.org\/wiki\/Named_parameter\">naming parameters<\/a> with support from the language, as you can do in Python.<\/p>\n<pre class=\"lang:python decode:true\">getApprovedCatPictures( limit=10, offset=0 );<\/pre>\n<p>To me this is not a small problem. Functions with more than 3 arguments might be rare in a well designed codebase, though even with fewer arguments readability suffers greatly. And there is an exception to the no more than 3 parameters per function: constructors. Unless you are being rather extreme and following <a href=\"http:\/\/williamdurand.fr\/2013\/06\/03\/object-calisthenics\/\">Object Calisthenics<\/a>, you&#8217;ll\u00a0have plenty of constructors\u00a0where the lack of named parameters gets extra\u00a0annoying. This is especially true for <a href=\"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/03\/missing-in-php7-value-objects\/\">value objects<\/a>, though\u00a0that is a topic for another post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the second\u00a0post in my Missing in PHP7 series. The previous one is about\u00a0function references. 2020 update: named parameters&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[328,400,401,179,195,441,197,206,316],"class_list":["post-1582","post","type-post","status-publish","format-standard","hentry","category-programming","tag-clean-code","tag-functions","tag-named-parameters","tag-oop","tag-php","tag-php7","tag-planet-wikimedia","tag-python","tag-software-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Missing in PHP7: Named parameters - Blog of Jeroen De Dauw<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Missing in PHP7: Named parameters - Blog of Jeroen De Dauw\" \/>\n<meta property=\"og:description\" content=\"This is the second\u00a0post in my Missing in PHP7 series. The previous one is about\u00a0function references. 2020 update: named parameters&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog of Jeroen De Dauw\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-01T16:59:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-04T11:53:51+00:00\" \/>\n<meta name=\"author\" content=\"Jeroen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/JeroenDeDauw\" \/>\n<meta name=\"twitter:site\" content=\"@JeroenDeDauw\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeroen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/\"},\"author\":{\"name\":\"Jeroen\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"headline\":\"Missing in PHP7: Named parameters\",\"datePublished\":\"2016-02-01T16:59:19+00:00\",\"dateModified\":\"2020-08-04T11:53:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/\"},\"wordCount\":451,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"keywords\":[\"Clean Code\",\"Functions\",\"Named parameters\",\"OOP\",\"PHP\",\"PHP7\",\"Planet Wikimedia\",\"Python\",\"Software design\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/\",\"name\":\"Missing in PHP7: Named parameters - Blog of Jeroen De Dauw\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\"},\"datePublished\":\"2016-02-01T16:59:19+00:00\",\"dateModified\":\"2020-08-04T11:53:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/2016\\\/02\\\/01\\\/missing-in-php7-named-parameters\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Missing in PHP7: Named parameters\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/\",\"name\":\"Entropy Wins\",\"description\":\"A blog on Software Architecture, Design and Craftsmanship\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.entropywins.wtf\\\/blog\\\/#\\\/schema\\\/person\\\/4e2ef14f2ca7dc3a0ac137d1692b66b7\",\"name\":\"Jeroen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\",\"caption\":\"Jeroen\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/jeroendedauw\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/JeroenDeDauw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Missing in PHP7: Named parameters - Blog of Jeroen De Dauw","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:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/","og_locale":"en_US","og_type":"article","og_title":"Missing in PHP7: Named parameters - Blog of Jeroen De Dauw","og_description":"This is the second\u00a0post in my Missing in PHP7 series. The previous one is about\u00a0function references. 2020 update: named parameters&hellip;","og_url":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/","og_site_name":"Blog of Jeroen De Dauw","article_published_time":"2016-02-01T16:59:19+00:00","article_modified_time":"2020-08-04T11:53:51+00:00","author":"Jeroen","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/JeroenDeDauw","twitter_site":"@JeroenDeDauw","twitter_misc":{"Written by":"Jeroen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/#article","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/"},"author":{"name":"Jeroen","@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"headline":"Missing in PHP7: Named parameters","datePublished":"2016-02-01T16:59:19+00:00","dateModified":"2020-08-04T11:53:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/"},"wordCount":451,"commentCount":8,"publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"keywords":["Clean Code","Functions","Named parameters","OOP","PHP","PHP7","Planet Wikimedia","Python","Software design"],"articleSection":["Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/","url":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/","name":"Missing in PHP7: Named parameters - Blog of Jeroen De Dauw","isPartOf":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#website"},"datePublished":"2016-02-01T16:59:19+00:00","dateModified":"2020-08-04T11:53:51+00:00","breadcrumb":{"@id":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/01\/missing-in-php7-named-parameters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.entropywins.wtf\/blog\/"},{"@type":"ListItem","position":2,"name":"Missing in PHP7: Named parameters"}]},{"@type":"WebSite","@id":"https:\/\/www.entropywins.wtf\/blog\/#website","url":"https:\/\/www.entropywins.wtf\/blog\/","name":"Entropy Wins","description":"A blog on Software Architecture, Design and Craftsmanship","publisher":{"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.entropywins.wtf\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.entropywins.wtf\/blog\/#\/schema\/person\/4e2ef14f2ca7dc3a0ac137d1692b66b7","name":"Jeroen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g","caption":"Jeroen"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/d62e6b5b8e332335cf17854fac850d9c70ba367c4692872613c3110ebd4e009b?s=96&d=mm&r=g"},"sameAs":["https:\/\/www.linkedin.com\/in\/jeroendedauw\/","https:\/\/x.com\/https:\/\/twitter.com\/JeroenDeDauw"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p74TBF-pw","jetpack-related-posts":[{"id":1548,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/01\/30\/missing-in-php7\/","url_meta":{"origin":1582,"position":0},"title":"Missing in PHP7","author":"Jeroen","date":"2016-01-30","format":false,"excerpt":"I've decided to start a series of short blog posts on how PHP gets in the way of\u00a0creating of well designed applications, with a focus on missing features. The language flamewar PHP is one of those languages that people love to hate. Its standard library is widely inconsistent, and its\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"PHP7","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/01\/PHP7.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1642,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/03\/05\/missing-in-php7-nullable-return-types\/","url_meta":{"origin":1582,"position":1},"title":"Missing in PHP7: Nullable return types","author":"Jeroen","date":"2016-03-05","format":false,"excerpt":"This is the fifth post in my Missing in PHP7 series. The previous one is about Collections. This is a short post, as there really is not much to explain or motivate. Nullable return types As of PHP7, we have return types at our disposal. Unfortunately, these have some annoying\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1629,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/22\/missing-in-php7-collections\/","url_meta":{"origin":1582,"position":2},"title":"Missing in PHP7: Collections","author":"Jeroen","date":"2016-02-22","format":false,"excerpt":"This is the fourth post in my Missing in PHP7 series. The previous one is about Value Objects. In this post I'll outline some problems PHP has with regards to collections, the implications of those problems, and a few mitigation strategies. PHP arrays PHPs main collection type is the associative\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/dfp.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/dfp.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/dfp.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/dfp.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2848,"url":"https:\/\/www.entropywins.wtf\/blog\/2022\/01\/30\/value-objects-with-php-8-1\/","url_meta":{"origin":1582,"position":3},"title":"Value Objects with PHP 8.1","author":"Jeroen","date":"2022-01-30","format":false,"excerpt":"PHP has introduced a number of new features that allow you to write awesome Value Objects with PHP 8.1. In this post you will learn about each feature and how to put them all together. Back in the dark ages of 2016, shortly after PHP 7.0 was released, I wrote\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/i-will-always-favor-value-objects.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/i-will-always-favor-value-objects.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/i-will-always-favor-value-objects.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1898,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/12\/02\/php-7-1-is-awesome\/","url_meta":{"origin":1582,"position":4},"title":"PHP 7.1 is awesome","author":"Jeroen","date":"2016-12-02","format":false,"excerpt":"PHP 7.1 has been released, bringing some features I was eagerly anticipating and some surprises that had gone under my radar. New iterable pseudo-type This is the feature I'm most exited about, perhaps because I had no clue it was in the works. In short, iterable allows for type hinting\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1607,"url":"https:\/\/www.entropywins.wtf\/blog\/2016\/02\/03\/missing-in-php7-value-objects\/","url_meta":{"origin":1582,"position":5},"title":"Missing in PHP7: Value objects","author":"Jeroen","date":"2016-02-03","format":false,"excerpt":"This is the third post in my Missing in PHP7 series. The previous one is about\u00a0named parameters. A Value Object does not have an identity, which means that if you have two of them with the same data, they are considered equal (take two latitude, longitude pairs for instance). Generally\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/www.entropywins.wtf\/blog\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/i-will-always-favor-value-objects.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/i-will-always-favor-value-objects.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.entropywins.wtf\/blog\/wp-content\/uploads\/2016\/02\/i-will-always-favor-value-objects.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/comments?post=1582"}],"version-history":[{"count":9,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1582\/revisions"}],"predecessor-version":[{"id":2753,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/posts\/1582\/revisions\/2753"}],"wp:attachment":[{"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/media?parent=1582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/categories?post=1582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.entropywins.wtf\/blog\/wp-json\/wp\/v2\/tags?post=1582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}