{"id":161,"date":"2010-06-16T22:23:36","date_gmt":"2010-06-16T21:23:36","guid":{"rendered":"http:\/\/www.andrewj.com\/blog\/index.php\/2010\/in-damnation-of-php\/"},"modified":"2010-10-20T06:04:02","modified_gmt":"2010-10-20T05:04:02","slug":"in-damnation-of-php","status":"publish","type":"post","link":"https:\/\/www.andrewj.com\/blog\/2010\/in-damnation-of-php\/","title":{"rendered":"In Damnation of PHP"},"content":{"rendered":"<p>&lt;rant&gt;Apologies if the title is a bit strong, but I think it&#8217;s the nearest I can get to the opposite of &#8220;In Praise of PHP&#8221;<\/p>\n<p>I&#8217;ve just spent a week-end migrating my website to a new hosting server. As part of that process, I had to rewrite all my old ASP code using PHP. Here&#8217;s what I learned:<\/p>\n<ol>\n<li>The Apache\/Linux community have misleadingly changed the meaning of &#8220;ASP&#8221;. If you bought a Linux-based hosting service 5+ years ago with &#8220;ASP&#8221;, it meant a *nix port of Active Server Pages. That worked for me, as I could develop it on Windows. Now, if you buy a Linux hosting service with &#8220;ASP&#8221; it means &#8220;Apache Server Pages&#8221;, and the embedded language is Perl. Useless!<\/li>\n<li>PHP has positively the worst combination of features for a language:\n<ul>\n<li>A c-based language&#8217;s sensitivity to case, ending semicolons and curly bracket counts,<\/li>\n<li>None of the protections against errors in the latter that a C++\/Java (or VB) language gives you, like strong typing and forced variable declaration,<\/li>\n<li>No single-step debugging. Now I accept that this may not be 100% true, so don&#8217;t all write in with the names of all the debuggers I didn&#8217;t find in a quick search for tools on Sunday morning, but certainly I don&#8217;t have one at the moment,<\/li>\n<li>It runs differently on Windows and Linux, and in a way I haven&#8217;t yet understood 100%, so I can only test by uploading to my live website.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>That said, I&#8217;ve still got it! I&#8217;ve managed to convert my blog and my book reviews, and I&#8217;ve actually improved on my old code for the latter. Just please let me have VB.NET back for my next major project.<\/p>\n<p>OK. &lt;\/rant&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;rant&gt;Apologies if the title is a bit strong, but I think it&#8217;s the nearest I can get to the opposite of &#8220;In Praise of PHP&#8221; I&#8217;ve just spent a week-end migrating my website to a new hosting server. As part &hellip; <a href=\"https:\/\/www.andrewj.com\/blog\/2010\/in-damnation-of-php\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/posts\/161"}],"collection":[{"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":0,"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andrewj.com\/blog\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}