{"id":1330,"date":"2018-01-19T19:22:43","date_gmt":"2018-01-19T19:22:43","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/the-need-for-speed\/"},"modified":"2018-01-19T19:24:42","modified_gmt":"2018-01-19T19:24:42","slug":"the-need-for-speed","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/the-need-for-speed\/","title":{"rendered":"The Need For Speed"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By Piergiorgio Spagnolatti<\/div>\n<div class=\"\">on March 21, 2001<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/phpbuilder.com\/wp-content\/uploads\/2018\/01\/piergiorgio.jpg\" class=\"articleAuthorImg\" alt=\"picture of Piergiogio Spagnolatti\" height=\"111\" width=\"90\" align=\"left\"\/><\/p>\n<div class=\"articlePara\">\nOne of the greatest advantages when using PHP is obviously speed. PHP4 is in general<br \/>\nfast enough for dynamic web content generation, and in most cases you can&#8217;t even think<br \/>\nof anything faster than it. But when you have to face lots of accesses, heavy applications,<br \/>\nnarrow bandwidth, or other factors that can create performance bottlenecks, you may ask yourself<br \/>\nif you can do anything to make things work better. In this article I&#8217;ll explain what you can<br \/>\ndo to further improve php performance, and how to make your users&#8217; browsing experience even<br \/>\nmore pleasant.<\/div>\n<h2>First of all, code optimization&#8230;<\/h2>\n<div class=\"articlePara\">\nNo, I&#8217;m not going to tell you again that you have to write clean and clear code, since<br \/>\neveryone knows it, and if you&#8217;re looking for speed then you probably already tweaked something<br \/>\nin your PHP sources. However, there&#8217;s something that can do this dirty job for you. It&#8217;s the<br \/>\nZend Optimizer, available for free (you have to agree to the Zend Optimizer license, since it&#8217;s not<br \/>\nreleased under the GPL) from <a href=\"http:\/\/www.zend.com\/\" target=\"_blank\">Zend Technologies<\/a><br \/>\nthe people that brought us our blazing fast PHP engine). It &#8220;simply&#8221; goes over the intermediate code generated by<br \/>\nthe Zend Engine and optimizes it for faster execution. I said &#8220;dirty job&#8221; since we all know<br \/>\nthat tweaking code sometimes can bring you to unreadable code, and this is not what you want<br \/>\nto find when making changes to your nearly forgotten 3-years-old PHP application&#8230; \ud83d\ude09 .<br \/>\nYou will notice that complex PHP sources sudden will benefit from Zend Optimizer, so I suggest<br \/>\nyou to use it as long as it doesn&#8217;t produce strange incompatibilites with your code (never found one<br \/>\nthough). Installing the Zend Optimizer is really easy. Just download the precompiled library<br \/>\nfor your platform, add the following two lines in your php.ini, restart your webserver, and&#8230; That&#8217;s it!<\/div>\n<div class=\"example\">\n<pre>\nzend_optimizer.optimization_level=15\nzend_extension=\"\/path\/to\/ZendOptimizer.so\" \nzend_loader.enable=Off\n<\/pre>\n<\/div>\n<div class=\"articlePara\">\nOoops&#8230; I said two lines and you find three. In fact the third line is optional, but it seems<br \/>\nthat disabling this zend_loader speeds up a bit the Optimizer, so it&#8217;s worth a line in your php.ini.<br \/>\nPay attention: you can disable the zend_loader only if you don&#8217;t use the Zend Encoder Runtime, which<br \/>\nwill be discussed later.<\/div>\n<\/div>\n<p><\/p>\n<div style=\"float: left; padding:15px; color:#17AAF3\">\n<div style=\"background-color:#B6E5FC; font-size:16px; margin-top:1px; padding:1px 4px 1px 4px; color:#000; font-style:bold; float:left;\">1<\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"piergiorgio200103214658.html?page=2\">2<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"piergiorgio200103219ba9.html?page=3\">3<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"piergiorgio20010321fdb0.html?page=4\">4<\/a> <\/div>\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"piergiorgio200103214658.html?page=2\">Next Page \u00bb<\/a><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>By Piergiorgio Spagnolatti on March 21, 2001 One of the greatest advantages when using PHP is obviously speed. PHP4 is in general fast enough for dynamic web content generation, and in most cases you can&#8217;t even think of anything faster than it. But when you have to face lots of&#8230; <a href=\"https:\/\/phpbuilder.com\/the-need-for-speed\/\" class=\"readmore\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1330","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=1330"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1330\/revisions"}],"predecessor-version":[{"id":2165,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1330\/revisions\/2165"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}