{"id":8430,"date":"2021-05-21T21:53:00","date_gmt":"2021-05-21T19:53:00","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=8430"},"modified":"2021-05-21T16:59:04","modified_gmt":"2021-05-21T14:59:04","slug":"starting-from-somewhere","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2021\/05\/21\/starting-from-somewhere\/","title":{"rendered":"Starting from somewhere"},"content":{"rendered":"\n<p>Today I was <a href=\"https:\/\/duckduckgo.com\/?q=php+diff+html&amp;t=ffab&amp;ia=web\">looking for a PHP library to show differences between two HTML documents<\/a>. No, the plain <a href=\"https:\/\/pear.php.net\/package\/Text_Diff\/docs\/latest\/Text_Diff\/Text_Diff_Renderer_inline.html\">Text_Diff\/Text_Diff_Renderer_inline<\/a> or <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_text_diff\/\">WordPress version<\/a> won&#8217;t do. <\/p>\n\n\n\n<p>I was so lucky to immediatly find <a href=\"https:\/\/github.com\/caxy\/php-htmldiff\">php-htmldiff<\/a>. <\/p>\n\n\n\n<p>Then I scrolled down and &#8211; horror of horrors! &#8211; just see what I found. I can&#8217;t litter my own blog with such a text. I will put a screenshot:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"127\" data-attachment-id=\"8431\" data-permalink=\"https:\/\/monodes.com\/predaelli\/2021\/05\/21\/starting-from-somewhere\/immagine-5\/\" data-orig-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/05\/immagine.png?fit=767%2C191&amp;ssl=1\" data-orig-size=\"767,191\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"immagine\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/05\/immagine.png?fit=510%2C127&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/05\/immagine.png?resize=510%2C127&#038;ssl=1\" alt=\"\" class=\"wp-image-8431\" srcset=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/05\/immagine.png?resize=510%2C127&amp;ssl=1 510w, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/05\/immagine.png?resize=300%2C75&amp;ssl=1 300w, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2021\/05\/immagine.png?w=767&amp;ssl=1 767w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure><\/div>\n\n\n\n<p>Well, I was joking. People wanting to learn has to start somewhere. I often give knowledge of too many things for granted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Today I was looking for a PHP library to show differences between two HTML documents. No, the plain Text_Diff\/Text_Diff_Renderer_inline or WordPress version won&#8217;t do. I was so lucky to immediatly find php-htmldiff. Then I scrolled down and &#8211; horror of horrors! &#8211; just see what I found. I can&#8217;t litter my own blog with such&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2021\/05\/21\/starting-from-somewhere\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","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":[105],"tags":[],"class_list":["post-8430","post","type-post","status-publish","format-standard","hentry","category-fun"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2bY","jetpack-related-posts":[{"id":9311,"url":"https:\/\/monodes.com\/predaelli\/2022\/04\/27\/9311\/","url_meta":{"origin":8430,"position":0},"title":"As I wished to add\u2026","author":"Paolo Redaelli","date":"2022-04-27","format":false,"excerpt":"As I wished to add a little NextCloud installation to my small corporate server I used its web installer that quaralled that PHP 7.2 is too old. I was used to Debian way of handling multiple versions of a package (having the major version in the package name). These notes\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3249,"url":"https:\/\/monodes.com\/predaelli\/2017\/07\/30\/learning-php-7\/","url_meta":{"origin":8430,"position":1},"title":"Learning PHP 7","author":"Paolo Redaelli","date":"2017-07-30","format":false,"excerpt":"Learning PHP 7: Learn the art of PHP programming through this example-rich book filled to the brim with tutorials every PHP developer needs to know One has to be humble enough to start from the beginning when he really wants to learn a language. I've read half of it and\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11656,"url":"https:\/\/monodes.com\/predaelli\/2024\/05\/18\/enum-best-practices-in-php-8-3\/","url_meta":{"origin":8430,"position":2},"title":"Enum Best Practices in PHP 8.3","author":"Paolo Redaelli","date":"2024-05-18","format":"link","excerpt":"Enums were added to PHP in 2021. In this post, I share my experience working with enums and give a brief overview. Source: Enum Best Practices in PHP 8.3","rel":"","context":"In &quot;PHP&quot;","block_context":{"text":"PHP","link":"https:\/\/monodes.com\/predaelli\/category\/php\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3428,"url":"https:\/\/monodes.com\/predaelli\/2017\/10\/09\/from-php-to-javascript-with-node-js-matters\/","url_meta":{"origin":8430,"position":3},"title":"From PHP to JavaScript with Node.js \u2013 Matters","author":"Paolo Redaelli","date":"2017-10-09","format":"link","excerpt":"https:\/\/blog.matters.tech\/migrating-from-php-to-javascript-with-node-js-155534498b58","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2453,"url":"https:\/\/monodes.com\/predaelli\/2017\/05\/15\/2453\/","url_meta":{"origin":8430,"position":4},"title":"I want to dive a\u2026","author":"Paolo Redaelli","date":"2017-05-15","format":"link","excerpt":"I want to dive a little into WordPress codebase but modern PHP is quite a different language from what I've learned - albeit a little - way ago, so long ago that Wordpress didn't even existed then. Beside reading the obvious official documentation, I've discovered that the almighty O'Really seems\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4792,"url":"https:\/\/monodes.com\/predaelli\/2018\/10\/28\/telosys-code-generator-for-java-javascript-python-nodejs-php-c-etc\/","url_meta":{"origin":8430,"position":5},"title":"Telosys code generator for Java, JavaScript, Python, NodeJS, PHP, C#, etc","author":"Paolo Redaelli","date":"2018-10-28","format":false,"excerpt":"Telosys is a free code generator usable with different languages or frameworks : Java, JavaScript, Python, NodeJS, PHP, GoLang, C#, Angular, VueJS, etc Sorgente: Telosys code generator for Java, JavaScript, Python, NodeJS, PHP, C#, etc","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/8430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=8430"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/8430\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=8430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=8430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=8430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}