<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-29862414</id><updated>2014-10-04T22:22:09.596-07:00</updated><title type='text'>PHP Tips and Tricks</title><subtitle type='html'>How to make your PHP programming code more light and more faster for your programming to build dedicated servers, web site monitoring, mortgage application, debt consolidation program, the sharper image, secure http, best web hosting, web meeting, and many more</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-29862414.post-115374779871522283</id><published>2006-07-24T06:27:00.000-07:00</published><updated>2006-07-24T06:29:59.443-07:00</updated><title type='text'>File Access Optimization</title><content type='html'>When you need to including file, please recheck file content that will be use. If file is not contains PHP codes, use &lt;span style=&quot;font-family: courier new;&quot;&gt;readfile()&lt;/span&gt; function to increase performance.&lt;br /&gt;Because files that including with &lt;span style=&quot;font-family: courier new;&quot;&gt;readfile()&lt;/span&gt; does not parsing by PHP. It will be different with construction language &lt;span style=&quot;font-family: courier new;&quot;&gt;include()&lt;/span&gt; and &lt;span style=&quot;font-family: courier new;&quot;&gt;require()&lt;/span&gt;, and files will be evaluated before.&lt;br /&gt;&lt;br /&gt;Consequence from using &lt;span style=&quot;font-family: courier new;&quot;&gt;readfile()&lt;/span&gt; is increase attack risk. This risk will be happen when  accessing file from URL.&lt;br /&gt;&lt;br /&gt;Solution for the attack risk is by using File Handling.</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115374779871522283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115374779871522283' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115374779871522283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115374779871522283'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/07/file-access-optimization.html' title='File Access Optimization'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115145636454109395</id><published>2006-06-27T17:58:00.000-07:00</published><updated>2006-06-27T17:59:24.826-07:00</updated><title type='text'>Using echo</title><content type='html'>Echo allowed gives more than one string as parameter. Using some parameters are going to more faster than blending some variables into a parameter.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;$a = ‘Hello’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;$b = ‘Word’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo ‘Say ‘ .$a. ‘ to ‘ .$b’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;//more faster&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo ‘Say ‘ , $a, ‘ to ‘, $b’; &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115145636454109395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115145636454109395' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145636454109395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145636454109395'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/using-echo.html' title='Using echo'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115145629821283718</id><published>2006-06-27T17:57:00.000-07:00</published><updated>2006-06-27T17:58:18.363-07:00</updated><title type='text'>Checking string size</title><content type='html'>We usually  using &lt;span style=&quot;font-family:courier new;&quot;&gt;strlen() &lt;/span&gt;function to check the string  size. The fast way to checking string  size is using &lt;span style=&quot;font-family:courier new;&quot;&gt;isset()&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;if (strlen($str) &lt;&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;echo ‘String must be at least 5 chars’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;if (!isset($str{5}))  {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;echo ‘String must be at least 5 chars’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;isset()&lt;/span&gt; needs more little time than &lt;span style=&quot;font-family:courier new;&quot;&gt;strlen()&lt;/span&gt; because &lt;span style=&quot;font-family:courier new;&quot;&gt;isset()&lt;/span&gt; is construction language. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115145629821283718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115145629821283718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145629821283718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145629821283718'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/checking-string-size.html' title='Checking string size'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115145611867837379</id><published>2006-06-27T17:54:00.000-07:00</published><updated>2006-06-27T17:55:19.083-07:00</updated><title type='text'>Avoid using Large String Concatenation</title><content type='html'>When do concatenation string, avoid uniting with large size string. It can obstructing code execution that really can display more faster.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;//large string concatenation&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;$title = ‘title’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;$body = ‘…a very large block…’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo “Subject: $title\n\n$body”;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;//avoid large string concatenation&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;$title = ‘title’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;$body = ‘…a very large block…’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo “Subject: $title\n\n”;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo $body; &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115145611867837379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115145611867837379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145611867837379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145611867837379'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/avoid-using-large-string-concatenation.html' title='Avoid using Large String Concatenation'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115145601761189972</id><published>2006-06-27T17:52:00.000-07:00</published><updated>2006-06-27T17:53:40.363-07:00</updated><title type='text'>Boolean data type</title><content type='html'>PHP is allowing to write Boolean data type with uppercase or lowercase. But, writing with lowercase is more faster than uppercase. When found a constant, PHP do lookup hash constant name.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;if ($var = TRUE) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;//this is more faster&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;if ($var = true) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When using a Boolean value, 1 and 0 are more faster than true and false.</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115145601761189972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115145601761189972' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145601761189972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145601761189972'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/boolean-data-type.html' title='Boolean data type'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115145593644732517</id><published>2006-06-27T17:50:00.000-07:00</published><updated>2006-06-27T17:52:16.676-07:00</updated><title type='text'>Avoid space in your code</title><content type='html'>In this tip and trick, I’m going to explain how to make code optimization on your application. The main purpose of this code optimization is to get more faster code execution. The elementary key is by writing code effectively and efficiently. Because PHP codes going to execute every time they are requested.&lt;br /&gt;&lt;br /&gt;Avoid space in your code&lt;br /&gt;&lt;br /&gt;Avoid using many spaces (&lt;span style=&quot;font-family: courier new;&quot;&gt; &lt;/span&gt;) is a good thing. Every space is 1 byte and every tab (&lt;span style=&quot;font-family: courier new;&quot;&gt;\t&lt;/span&gt;) is 1 byte. When you’re using four spaces, you’ve been use 4 bytes. It’s more effective if you’re using a tab (&lt;span style=&quot;font-family: courier new;&quot;&gt;\t&lt;/span&gt;).</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115145593644732517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115145593644732517' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145593644732517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115145593644732517'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/avoid-space-in-your-code.html' title='Avoid space in your code'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115057167407807650</id><published>2006-06-17T12:13:00.001-07:00</published><updated>2006-06-17T12:14:34.080-07:00</updated><title type='text'>Print Output</title><content type='html'>PHP is giving some sting functions to printing output into browser and we are often using &lt;span style=&quot;font-family: courier new;&quot;&gt;print()&lt;/span&gt; and &lt;span style=&quot;font-family: courier new;&quot;&gt;echo()&lt;/span&gt; function. Both of those functions are not real function but a language construction.   &lt;span style=&quot;font-family: courier new;&quot;&gt;print() &lt;/span&gt;and &lt;span style=&quot;font-family: courier new;&quot;&gt;echo()&lt;/span&gt; function have same goal, but there are some essential different that must to pay attention.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;Print()&lt;/span&gt; function behavior like the other function in common and having return value integer 1. Thus, &lt;span style=&quot;font-family: courier new;&quot;&gt;print()&lt;/span&gt; can used as part of expression which more complex. Meanwhile, &lt;span style=&quot;font-family: courier new;&quot;&gt;echo()&lt;/span&gt; is able to accept more than one parameters all at once, and does not having return value.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;print() ‘string 1’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo ‘string 1’;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic; font-family: courier new;&quot;&gt;// using some parameters&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo ‘string 1’, “string 2”, ‘…’;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;echo()&lt;/span&gt; function string will execution more faster than &lt;span style=&quot;font-family: courier new;&quot;&gt;print()&lt;/span&gt;. This differentiate caused by will return status (integer) which expose what process has done or not.&lt;br /&gt;&lt;br /&gt;On the other side, &lt;span style=&quot;font-family: courier new;&quot;&gt;echo()&lt;/span&gt; just displaying output only and do anything. At implementation, return value status from using function string almost never needed.</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115057167407807650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115057167407807650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115057167407807650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115057167407807650'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/print-output.html' title='Print Output'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-29862414.post-115057161151475875</id><published>2006-06-17T12:13:00.000-07:00</published><updated>2006-06-17T12:13:31.523-07:00</updated><title type='text'>Why you must do it</title><content type='html'>I create this blog to every body who want learn about web programming PHP. But I don&#39;t tell what is PHP and the basic. In this blog, I assume that you had been familiar with PHP.&lt;br /&gt;&lt;br /&gt;I just wanna share about tips and tricks in PHP programming. Why? Only one reason to answer. Make a light and more faster programming.&lt;br /&gt;&lt;br /&gt;So, let&#39;s enjoy it. I hope this blog give you more beneficial at your web programming using PHP.</content><link rel='replies' type='application/atom+xml' href='http://php-undercover.blogspot.com/feeds/115057161151475875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=29862414&amp;postID=115057161151475875' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115057161151475875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/29862414/posts/default/115057161151475875'/><link rel='alternate' type='text/html' href='http://php-undercover.blogspot.com/2006/06/why-you-must-do-it.html' title='Why you must do it'/><author><name>ian</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>