{"id":419,"date":"2008-01-16T13:38:41","date_gmt":"2008-01-16T19:38:41","guid":{"rendered":"http:\/\/blog.codedread.com\/archives\/2008\/01\/16\/the-whole-php5-migration-thing\/"},"modified":"2008-01-16T13:38:41","modified_gmt":"2008-01-16T19:38:41","slug":"the-whole-php5-migration-thing","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2008\/01\/16\/the-whole-php5-migration-thing\/","title":{"rendered":"The Whole PHP5 Migration Thing"},"content":{"rendered":"<p><object type=\"image\/svg+xml\" width=\"100\" height=\"100\" align=\"right\" hspace=\"10\" data=\"http:\/\/codedread.com\/clipart\/php.svgz\"><span\/><\/object>I recently made the switch from PHP4 to PHP5.  Let me know if you see any breakages.  Lots of hoopla about PHP4 being <span class=\"definition\" title=\"End Of Life\">EOL<\/span>'d in 2007, effectively forcing everyone (including hosts) to upgrade to PHP5.  <!--more--><\/p>\n<div class=\"ads\"><object type=\"text\/html\" width=\"468\" height=\"60\" data=\"http:\/\/www.codedread.com\/gads.php\"><\/object><\/div>\n<p><a href=\"http:\/\/photomatt.net\/2007\/07\/13\/on-php\/\">Matt<\/a> from WordPress disses the heavy-handed move to PHP5.  I personally like PHP5 better than PHP4, though my site was using PHP4 for everything.  I notice Matt says \"there isn\u2019t a released PHP app today that isn\u2019t PHP 5-compatible\".  But I don't think this can be true, unless he means PHP apps that matter to him.  They point to <a href=\"http:\/\/www.php.net\/manual\/en\/migration5.incompatible.php\">this page<\/a> which describes the differences between PHP 4 and 5, but I think something huge is missing from this page: DOM manipulation.  There is a potentially big change to web apps out there that use DOM XML.<\/p>\n<p>The only thing I had to do when migrating was to change my <a href=\"http:\/\/us.php.net\/manual\/en\/ref.domxml.php\">DOM XML<\/a> function calls to use <a href=\"http:\/\/us.php.net\/manual\/en\/ref.dom.php\">DOM<\/a>.<\/p>\n<ul>\n<li>DOM XML will \"never be released with PHP 5\".<\/li>\n<li>DOM is a PHP5-only feature.<\/li>\n<\/ul>\n<p>These changes affect every line of code that used a DOM XML function, but the changes are pretty trivial, especially if you already know the DOM.  XSLT handling is also not backward\/forward compatible, from what I understand.<\/p>\n<p>But why does that PHP page neglect to mention this?  This was pointed out in 2004 by Justin Gehring, but the page fails to have been updated as an official notice.  <a href=\"http:\/\/alexandre.alapetite.net\/cv\/alexandre-alapetite.en.html\">Alexandre Alapetite<\/a> has provided a <a href=\"http:\/\/alexandre.alapetite.net\/doc-alex\/domxml-php4-php5\/\">module<\/a> that, I think, eases this transition (Disclaimer:  I have not used this module because I rewrote my PHP for PHP5).<\/p>\n<p>In all likelihood, I am missing something obvious here - so please chime in and put me on the clue-train.  Do people typically not manipulate the DOM in PHP?<\/p>\n<div class=\"ads\"><object type=\"text\/html\" width=\"468\" height=\"60\" data=\"http:\/\/www.codedread.com\/gads.php\"><\/object><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I recently made the switch from PHP4 to PHP5. Let me know if you see any breakages. Lots of hoopla about PHP4 being EOL&#8217;d in 2007, effectively forcing everyone (including hosts) to upgrade to PHP5.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,25,11,28],"tags":[195],"class_list":["post-419","post","type-post","status-publish","format-standard","hentry","category-php","category-software","category-technology","category-web","tag-php"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=419"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/419\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}