<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>M G SUKHON</title>
	<atom:link href="http://sukhon007.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sukhon007.wordpress.com</link>
	<description>RnD on Typical PHP problem</description>
	<lastBuildDate>Thu, 18 Nov 2010 09:22:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sukhon007.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>M G SUKHON</title>
		<link>http://sukhon007.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sukhon007.wordpress.com/osd.xml" title="M G SUKHON" />
	<atom:link rel='hub' href='http://sukhon007.wordpress.com/?pushpress=hub'/>
		<item>
		<title>JQuery $(document).ready is not working in wordpress</title>
		<link>http://sukhon007.wordpress.com/2010/06/06/jquery-conflicts-wordpress/</link>
		<comments>http://sukhon007.wordpress.com/2010/06/06/jquery-conflicts-wordpress/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 06:12:53 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[$()]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://sukhon007.wordpress.com/?p=36</guid>
		<description><![CDATA[jQuery code conflicts with other variable code. the $() syntax is always used by other scripting library, and causing the conflict issue and fail to call the jQuery function. Never use jQuery handy function $() in Wordpress plugin. You have to use jQuery() or jQuery.noConflict() Usual code: $(document).ready( function () { $(&#8216;#expandiv&#8217;).flash( { swf:  &#8217;/fathersday.swf&#8217;, width:680, height:495, wmode:&#8217;transparent&#8217; }); }); The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=36&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>jQuery code conflicts with other variable code. the <strong>$()</strong> syntax is always used by other scripting library, and causing the conflict issue and fail to call the jQuery function. Never use jQuery handy function <strong>$()</strong> in Wordpress plugin. You have to use <strong>jQuery()</strong> or <strong>jQuery.noConflict()</strong></p>
<p><strong>Usual code:</strong></p>
<table>
<tbody>
<tr>
<td>$(document).ready(</td>
</tr>
<tr>
<td></td>
<td>function () {</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>$(&#8216;#expandiv&#8217;).flash(</td>
</tr>
<tr>
<td></td>
<td>{</td>
</tr>
<tr>
<td></td>
<td>swf:  &#8217;/fathersday.swf&#8217;,</td>
</tr>
<tr>
<td></td>
<td>width:680,</td>
</tr>
<tr>
<td></td>
<td>height:495,</td>
</tr>
<tr>
<td></td>
<td>wmode:&#8217;transparent&#8217;</td>
</tr>
<tr>
<td></td>
<td>});</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>});</td>
</tr>
</tbody>
</table>
<p>The above will not work. We have to use the following</p>
<p><strong>Solution:</strong></p>
<p><strong>$j=jQuery.noConflict();</strong><br />
<strong> $j</strong>(document).ready(<br />
function () {<br />
<strong>$j</strong>(&#8216;#expandiv&#8217;).flash({</p>
<p>swf: site_skin_images + &#8216;/jackgeorges_fathersday.swf?i=443&#8242;,<br />
width:680,<br />
height:495,<br />
wmode:&#8217;transparent&#8217;<br />
});<br />
});</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=36&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2010/06/06/jquery-conflicts-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing jQuery wrap() in IE</title>
		<link>http://sukhon007.wordpress.com/2010/04/26/fixing-jquery-wrap-in-ie/</link>
		<comments>http://sukhon007.wordpress.com/2010/04/26/fixing-jquery-wrap-in-ie/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 07:03:40 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://sukhon007.wordpress.com/?p=32</guid>
		<description><![CDATA[I used wrap operation to insert a span into a UL container to perform a toggle expand/collapse of a tree menu.  So the span should wrap over the ul container as stated in jQuery documentation. However, in IE it couldn’t seems to find this particular new span that was inserted through the wrap operation. Since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=32&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I used wrap operation to insert a span into a UL container to perform a toggle expand/collapse of a tree menu.   So the span should wrap over the ul container as stated in jQuery  documentation. However, in IE it couldn’t seems to find this particular  new span that was inserted through the wrap operation.  Since this is a JavaScript DHTML operation, obviously it won’t show  during view source. I tried to debug by firebug lite to find out .the issue and found jQuery warp doesn’t support IE. I used the code as follows</p>
<p><strong>$(&#8216;ul.tree.dhtml ul&#8217;).prev().wrap(&#8220;&lt;span class=&#8217;grower OPEN&#8217;&gt;&#8221;)</strong></p>
<p>which is working fine in other browser but IE doesn&#8217;t do.</p>
<p><strong>Solution:</strong></p>
<p>IE<strong> </strong>requires end tag to wrap. So I used the following code to fix the issue but this will also create same problem in other browser.</p>
<p><strong>$(&#8216;ul.tree.dhtml ul&#8217;).prev().wrap(&#8220;&lt;span class=&#8217;grower OPEN&#8217;&gt; &lt;/span&gt;&#8221;)</strong></p>
<p>Finally I had to check the browser identity.</p>
<p><strong>var browpattern = /Internet/;</strong><br />
<strong>if(browpattern.test(navigator.appName)) { // IE: Microsoft Internet Explorer<br />
$(&#8216;ul.tree.dhtml ul&#8217;).prev().wrap(&#8220;&lt;span class=&#8217;grower OPEN&#8217;&gt; &lt;/span&gt;&#8221;);<br />
} else {<br />
$(&#8216;ul.tree.dhtml ul&#8217;).prev().wrap(&#8220;&lt;span class=&#8217;grower OPEN&#8217;&gt;&#8221;);<br />
}</strong></p>
<p>There are several ways to get browser identity and you can use any of them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=32&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2010/04/26/fixing-jquery-wrap-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
		<item>
		<title>Common Web Programming Problems</title>
		<link>http://sukhon007.wordpress.com/2010/01/13/common-web-programming-problems/</link>
		<comments>http://sukhon007.wordpress.com/2010/01/13/common-web-programming-problems/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 06:16:21 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[Design pattern]]></category>

		<guid isPermaLink="false">http://sukhon007.wordpress.com/?p=29</guid>
		<description><![CDATA[1 Confessing our Infancy At the very beginning we should perform when documenting common web programming problems is admit that we are relatively new to this game. Web sites and applications are rapidly evolving and grow more advance everyday. While the web is growing at a gigantic pace there are definite standards and techniques that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=29&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>1 Confessing our Infancy</h3>
<p>At the very beginning we should perform when documenting common web programming problems is admit that we are relatively new to this game. Web sites and applications are rapidly evolving and grow more advance everyday.</p>
<p>While the web is growing at a gigantic pace there are definite standards and techniques that are coming to maturity. For example, the basic design of portal sites such as Google has settled into an established pattern.</p>
<h3>2 Web Programming Application Levels</h3>
<p>One of the most exciting and difficult aspects of web programming is that it requires expertise on many different levels. Web master need skills in user interface design, human machine interaction, information design, scripting, code library development, database design and database queries. These can be organized and categorized in this diagram:</p>
<ul>
<li>User Interface</li>
<li>Human Computer Interaction</li>
<li>Information Design</li>
<li>Scripting</li>
<li>Code Library Development</li>
<li>Database Queries</li>
<li>Database Design</li>
</ul>
<p>Any structure for describing patterns in web programming will need to be capable of explaining the design considerations across any or all of these levels. Web developers face them many or all of these levels.</p>
<h3>3 Common Problems and Techniques</h3>
<p><strong>3.1 Form Using</strong></p>
<p>Form is used to capture the problem of getting and verifying input from a user. It is at the core of all web applications and there are many different approaches for solving this problem available to the web developer.</p>
<p>The basic method and constructs for prompting the user remain the same regardless of the actual content being entered. All forms must:</p>
<ul>
<li>Display an empty form to the user</li>
<li>Verify the data entered is valid and display an error if it is incorrect</li>
<li>Perform the required action using the data</li>
</ul>
<p>Forms can be implemented using either a single or multiple page design. The single page technique utilizes a self-referring script to display and process the form. Multi-page forms take the user through a series of pages to enter, confirm and submit the data.</p>
<p>Developer should use both client-side and server-side validation in their form using. The other important area to consider when thinking about form design is the reporting mechanism for invalid data. Some people like to display the form with the input highlighting any errors. This makes it simple for the user to find and fix problems in the data. Others prefer to keep the page and application design as simple as possible by reporting errors on a separate page. The user then needs to either go back to the original form using the back button on their browser or they may be presented with a link to a page which will contain their entered data.</p>
<p><strong>3.2 Navigation</strong></p>
<p>Meaningful, clean, structured navigation and information design is one of the most important aspects of web design. There needs to be a consistent look and feel throughout the site. Any User needs to be able to immediately recognize their location in the site as a search engine referral can throw them anywhere.</p>
<p>There are three major navigation designs employed on the web today.</p>
<ul>
<li>Single level navigation has a list of top level areas within the site.</li>
<li>Multi-level navigation breaks the site into a hierarchy. The user can then drill down through these levels to find the desired content. All levels of the hierarchy are displayed as part of the navigation at all times. As such the hierarchy is usually only two levels deep to keep the display simple.</li>
<li>Dynamic multi-level navigation also uses a hierarchy except here the next level of navigation is not shown to the user until they have selected the parent.</li>
</ul>
<p><strong>3.3 Database Handling</strong></p>
<p>The best way to access a database is a fundamental problem for web developers. In fact, it&#8217;s so common that we could easily forget to consider it as being a problem we need to solve. Most people access databases through specific functions, class or an abstracted database wrapper.</p>
<p>Many web applications and forms revolve around letting the user insert new information into the database and edit existing entries. The data being used is irrelevant to the solutions employed making this a good candidate for a pattern.</p>
<p><strong>3.4 Authentication</strong></p>
<p>Any request to a web site is authenticated at one of the following levels:</p>
<ul>
<li>None &#8211; we do nothing to record or track the request</li>
<li>Visitor &#8211; we track this anonymous person across numerous sessions at the site</li>
<li>User &#8211; we have information about the person and require them to authenticate</li>
</ul>
<p>These levels of authentication are related and have similar implementations. They should be considered together as we need to know the authentication level of any request to the site.</p>
<p><strong>3.5 Error Handling</strong></p>
<p>Fixing errors before they confuse users is vital. Logging and notifying the maintainers of these errors is equally important to prevent them happening again.</p>
<p>Another good error handling problem to consider is keeping the site alive even if components are off-line. For example, if the database is being backed up and thus read-only can we continue to serve database requests without trying to write. Or if the database is offline completely can we continue to show pages that do not really need to use the database.</p>
<p><strong>3.6 E-commerce</strong></p>
<p>E-commerce is an interesting problem because it requires the form and authentication problems above to be solved. The challenge is to build a pattern for e-commerce that is not dependent on a particular implementation of forms or authentication.</p>
<h3>4 Categorizing the Application Levels affected by each Problem</h3>
<p>Placing problems into their levels will help us to understand which problems are specific to web programming.</p>
<p><strong>4.1 Form Using</strong></p>
<p>All form processing is done through a user interface interaction with the user. This results in calls to the high-level functions implemented in the code libraries. As such, form processing is limited to all of the front-end levels.</p>
<p><strong>4.2 Navigation</strong></p>
<p>Single and multi-level navigation is limited to the user interface and human computer interaction levels.</p>
<p>Dynamic multi-level navigation requires knowledge of the users current location and the ability to generate navigational menus. Backend libraries will also be required to generate these menus. Whether these should be part of a pattern for multi-level navigation or just listed as a collaborator is open to debate.</p>
<p><strong>4.3 Database Handling</strong></p>
<p>Database wrapper code lives in the code library and database query levels. It actually only needs to know about simple database queries since most are just passed through the wrapper class.</p>
<p>Formalizing the process of inserting and editing data into the database requires the use of all levels. We need to design the database to facilitate this type of data entry. The user interface must be developed to make the process clear.</p>
<p>Trying to encapsulate database rows as objects or items is limited to the backend levels. The front-end has access to this data through the API developed for the items.</p>
<p><strong>4.4 Authentication</strong></p>
<p>User level authentication requires interaction with the person through the front-end. It also requires backend functions to verify and process the information arising from this interaction. It uses all levels of web programming.</p>
<p>All other forms of authentication require no interaction with the user.  They are completely contained in the backend levels.</p>
<p><strong>4.5 Error Handling</strong></p>
<p>Errors must be reported to the user and detected at all levels of the application.  Error handling code uses all levels.</p>
<p><strong>4.6 E-commerce</strong></p>
<p>E-commerce requires interaction with the user and backend processing of the data.  It requires all levels.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=29&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2010/01/13/common-web-programming-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
		<item>
		<title>How design pattern comes to developer?</title>
		<link>http://sukhon007.wordpress.com/2010/01/06/how-design-pattern-comes/</link>
		<comments>http://sukhon007.wordpress.com/2010/01/06/how-design-pattern-comes/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 11:14:59 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[Design pattern]]></category>

		<guid isPermaLink="false">http://sukhon007.wordpress.com/?p=26</guid>
		<description><![CDATA[Introduction to Design Patterns Design patterns are basically an extensive method that can be used in solving a variety of different problems.  Design patterns use the principles of Object Oriented Programming (OOP) to help you create code that will be easy for you and the developers who follow you to understand, revise and extend. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=26&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1><strong>Introduction to Design Patterns<br />
</strong></h1>
<p>Design patterns are basically an extensive method that can be used in solving a variety of different problems.  Design patterns use the principles of Object Oriented Programming (OOP) to help you create code that will be easy for you and the developers who follow you to understand, revise and extend.</p>
<p>The importance of design patterns is that they formally document problems and their solutions. This gives us a means to recognize and refer to known problems. We also have a means for comparing alternative solutions with full awareness of the consequences of each alternative.</p>
<p>By formally describing design patterns for web programming we can capture the knowledge of experts into a form that can be used by any developer. Well-named design patterns will also improve the ability of web developers to communicate their ideas and intended solutions.</p>
<p>Design Patterns are simply defined solutions to common problems.  Design patterns are proven solutions that are implemented over and over again through different projects.  This re-use of the solution itself becomes a pattern.  Don&#8217;t be intimidated by the imaginative names given to design patterns, such as illusion, singleton or spectator, they are exactly that just decorative names given to repeatable solutions.</p>
<ul>
<li>A design pattern is  a recommended solution rather than a style that is not implementation specific.  In other words you can take the same design pattern and implement it with any language, of course if the design pattern is an OO design pattern you need to implement it with an object-oriented language.  More importantly the implementation itself may vary from project to project because of project restraints and requirements.</li>
<li>A design pattern is NOT a framework, though depending on whom you speak to, a group of design patterns maybe considered as a design framework.</li>
</ul>
<p><strong>Why Use Design Patterns</strong></p>
<p>Design patterns are not new. In fact, the concepts behind them go back 20+ years but it&#8217;s really in the past 4-5 years that they&#8217;ve really gained prominence in software development in general. Most PHP developers may first ask why use Design Patterns or why design in the first place.  You will find Design and Design Patterns are beneficial in regards of:</p>
<ul>
<li>Maintenance</li>
<li>Documentation</li>
<li>Readability</li>
<li>Easy when developing in large development teams</li>
<li>Reusable by other then yourself</li>
</ul>
<p><span style="font-family:Verdana;font-size:x-small;">If this indeed is true then object-oriented development and design pattern skills are a definite asset to your resume.  Most enterprise applications that succeed are because of the fact that a good methodology and development process is in place, and apart of that comes design and with design more then likely comes design patterns.</span></p>
<p>However there is a trade off with design patterns because it adds another layer/component of abstraction there maybe a loss in performance and efficiency.   Granted this may not be noticeable on high-end servers, but could be problem on low-end servers.</p>
<p>Going off topic for moment, this is especially so when developing J2ME mobile applications, this would be prime example where coding like style would be more dominant then object-oriented coding purely for the fact that memory and heap size on mobile devices is limited.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=26&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2010/01/06/how-design-pattern-comes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
		<item>
		<title>Benchmarking PHP’s Magic Methods</title>
		<link>http://sukhon007.wordpress.com/2009/10/22/benchmarking/</link>
		<comments>http://sukhon007.wordpress.com/2009/10/22/benchmarking/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 11:03:16 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[PHP Cache Handler]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[magic methods]]></category>

		<guid isPermaLink="false">http://sukhon007.wordpress.com/?p=17</guid>
		<description><![CDATA[Benchmarking PHP’s Magic Methods First, benchmarking a web server is not an easy thing. To benchmark a web server the time it will take to give a page is not important: you don&#8217;t care if a user can have his page in 0.1 ms or in 0.05 ms as nobody can have such delays on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=17&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Benchmarking PHP’s Magic Methods </strong></p>
<p>First, benchmarking a web server is not an easy thing. To benchmark a web server the time it will take to give a page is not important: you don&#8217;t care if a user can have his page in 0.1 ms or in 0.05 ms as nobody can have such delays on the Internet.</p>
<p>Larry Garfield has an interesting set of benchmarks covering many of PHP’s magic methods. His results correspond pretty well to my own benchmarks in the area. The thing to take away is that its not necessarily the overhead of the magic methods, but rather what you do inside them. Its hard to do anything useful inside a magic method, such as __get or __call that isn’t 10 to 20 times slower than the “non-magic” solution.</p>
<p>There are probably more than a few naive programmers who would read results like this and start to avoid these constructs in their own code for performance reasons. These are the same kinds of people obsessing over a few single or double quotes, who eschew “slow” objects in favor of switch statements that are many times slower than the polymorphic method calls they are trying to avoid.  But, that’s not the end of the story. Larry ran his benchmarks using 2,000,000 iterations. The N really matters here. Sure, iterators are slower than arrays, but you aren’t going to be iterating over two million things. I tend to fetch my database records in lots of 25 or 50. You aren’t going to be making two million invocations of __call. But how many will you make? Under what value of N does the performance of these techniques cease to matter? Is it ten, one hundred, one thousand, or ten thousand? You may be surprised at how few calls your program actually does and how little impact it has on performance.  As Wez and Travis point out in their comments, profiling is the way to find out the potential impact and to discover your true N.</p>
<p>Paul M. Jones has a good example of what I’m talking about. There, call_user_func_array appears to be a bottleneck, but it turns out that its the function being called, htmlspecialchars, not the calling process that consumes the balance of the time. In that case, the function was “only” called 300 times. I find that order of magnitude to be fairly typical. Something to be aware of, perhaps, but not something to obsess over.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=17&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2009/10/22/benchmarking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
		<item>
		<title>Memcache server</title>
		<link>http://sukhon007.wordpress.com/2009/06/11/memcache-server/</link>
		<comments>http://sukhon007.wordpress.com/2009/06/11/memcache-server/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:12:12 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[PHP Cache Handler]]></category>
		<category><![CDATA[memcache]]></category>

		<guid isPermaLink="false">http://sukhon007.wordpress.com/?p=9</guid>
		<description><![CDATA[memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. The memcached server and clients work together to implement one global cache across as many machines as you have. In fact, it&#8217;s recommended you run both web nodes (which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=9&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>memcached</strong> is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.</p>
<p>The <strong>memcached </strong>server and clients work together to implement one global cache across as many machines as you have.  In fact, it&#8217;s recommended you run both web nodes (which are typically memory-lite and CPU-hungry) and memcached processes (which are memory-hungry and CPU-lite) on the same machines.  This way you&#8217;ll save network ports.</p>
<p><strong>Installation</strong></p>
<p>You have enable memcache extension from php.ini file.</p>
<p>Download memcache daemon from  <a rel="nofollow" href="http://jehiah.cz/projects/memcached-win32/" target="_blank">http://jehiah.cz/projects/memcached-win32/</a></p>
<p>To install memcached as a service, follow the next steps:</p>
<ol>
<li>Unzip the binaries in your desired directory (eg. c:\memcached)</li>
<li>Install the service using the command: &#8216;c:\memcached\memcached.exe -d install&#8217; from either the command line</li>
<li>Start the server from the Microsoft Management Console or by running the following command: &#8216;c:\memcached\memcached.exe -d start&#8217;</li>
<li>Use the server, by default listening to port 11211</li>
</ol>
<p>Sometimes  it says couldn&#8217;t connect because i was n`t running the daemon. When you install the memcached it only install the extension and this gives the interface (functions) to access the memcache but to be able to store and retrieve data you need to install and run the daemon.</p>
<p><strong>Sample Code:</strong></p>
<p><code style="white-space:nowrap;"><code><span style="color:#000000;"><span style="color:#0000bb;">$memcache </span><span style="color:#007700;">= new </span><span style="color:#0000bb;">Memcache</span><span style="color:#007700;">;<br />
</span><span style="color:#0000bb;">$memcache</span><span style="color:#007700;">-&gt;</span><span style="color:#0000bb;">connect</span><span style="color:#007700;">(</span><span style="color:#dd0000;">'localhost'</span><span style="color:#007700;">, </span><span style="color:#0000bb;">11211</span><span style="color:#007700;">) or die (</span><span style="color:#dd0000;">"Could not connect"</span><span style="color:#007700;">);</p>
<p></span><span style="color:#0000bb;">$version </span><span style="color:#007700;">= </span><span style="color:#0000bb;">$memcache</span><span style="color:#007700;">-&gt;</span><span style="color:#0000bb;">getVersion</span><span style="color:#007700;">();<br />
echo </span><span style="color:#dd0000;">"Server's version: "</span><span style="color:#007700;">.</span><span style="color:#0000bb;">$version</span><span style="color:#007700;">.</span><span style="color:#dd0000;">"&lt;br/&gt;\n"</span><span style="color:#007700;">;</p>
<p></span><span style="color:#0000bb;">$tmp_object </span><span style="color:#007700;">= new </span><span style="color:#0000bb;">stdClass</span><span style="color:#007700;">;<br />
</span><span style="color:#0000bb;">$tmp_object</span><span style="color:#007700;">-&gt;</span><span style="color:#0000bb;">str_attr </span><span style="color:#007700;">= </span><span style="color:#dd0000;">'test'</span><span style="color:#007700;">;<br />
</span><span style="color:#0000bb;">$tmp_object</span><span style="color:#007700;">-&gt;</span><span style="color:#0000bb;">int_attr </span><span style="color:#007700;">= </span><span style="color:#0000bb;">123</span><span style="color:#007700;">;</p>
<p></span><span style="color:#0000bb;">$memcache</span><span style="color:#007700;">-&gt;</span><span style="color:#0000bb;">set</span><span style="color:#007700;">(</span><span style="color:#dd0000;">'key'</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$tmp_object</span><span style="color:#007700;">, </span><span style="color:#0000bb;">false</span><span style="color:#007700;">, </span><span style="color:#0000bb;">10</span><span style="color:#007700;">) or die (</span><span style="color:#dd0000;">"Failed to save data at the server"</span><span style="color:#007700;">);<br />
echo </span><span style="color:#dd0000;">"Store data in the cache (data will expire in 10 seconds)&lt;br/&gt;\n"</span><span style="color:#007700;">;</p>
<p></span><span style="color:#0000bb;">$get_result </span><span style="color:#007700;">= </span><span style="color:#0000bb;">$memcache</span><span style="color:#007700;">-&gt;</span><span style="color:#0000bb;">get</span><span style="color:#007700;">(</span><span style="color:#dd0000;">'key'</span><span style="color:#007700;">);<br />
echo </span><span style="color:#dd0000;">"Data from the cache:&lt;br/&gt;\n"</span><span style="color:#007700;">;</p>
<p></span><span style="color:#0000bb;">var_dump</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$get_result</span><span style="color:#007700;">); </span></span></code></code></p>
<p><strong>Conclusion</strong></p>
<p>Memcahce is very faster than shm_op.  It uses <a href="http://www.monkey.org/%7Eprovos/libevent/">libevent</a> to scale to any number of open connections (using <a href="http://www.xmailserver.org/linux-patches/nio-improve.html">epoll</a> on Linux, if available at runtime), uses non-blocking network I/O, refcounts internal objects (so objects can be in multiple states to multiple clients), and uses its own slab allocator and hash table so virtual memory never gets externally fragmented and allocations are guaranteed.</p>
<p>Reference: http://danga.com/memcached/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=9&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2009/06/11/memcache-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
		<item>
		<title>Shared memory</title>
		<link>http://sukhon007.wordpress.com/2009/06/10/shared-memory/</link>
		<comments>http://sukhon007.wordpress.com/2009/06/10/shared-memory/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 04:30:48 +0000</pubDate>
		<dc:creator>Sukhon</dc:creator>
				<category><![CDATA[PHP Cache Handler]]></category>
		<category><![CDATA[shared memory]]></category>
		<category><![CDATA[shm_op]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Shared memory by shm_op is an easy to use set of functions that allows PHP to read, write, create and delete Unix shared memory segments. you can use them to share data between different PHP scripts or even with other processes running in your server. The first thing people generally do is cache things within [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=1&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Shared memory by<strong> shm_op</strong> is an easy to use set of functions that allows PHP to read,  write, create and delete Unix shared memory segments. you can use them to share data between different PHP scripts or even with other processes running in your server.</p>
<p>The first thing people generally do is cache things within their web processes.  But this means your cache is duplicated multiple times, once for each mod_perl/PHP/etc thread.  This is a waste of memory and you&#8217;ll get low cache hit rates.  If you&#8217;re using a multi-threaded language or a shared memory API (IPC::Shareable, etc), you can have a global cache for all threads, but it&#8217;s per-machine.  It doesn&#8217;t scale to multiple machines. Once you have 20 webservers, those 20 independent caches start to look just as silly as when you had 20 threads with their own caches on a single box.  (plus, shared memory is typically laden with limitations)</p>
<p>One annoying thing is that shm_op requires to allocate a memory block first though the system don&#8217;t know how much memory it needs to handle data. That&#8217;s why, this is apperant that shm_op either block some spaces which are not used or cannot save data if allocated size is less than data size.</p>
<p><strong>Installation</strong></p>
<p>You have to enable shm_op extension from php.ini file and restart apache server.</p>
<p><strong>Sample Code</strong></p>
<p><span style="color:#ff8000;">// Create 100 byte shared memory block with system id of 0xff3<br />
</span><span style="color:#0000bb;">$shm_id </span><span style="color:#007700;">= </span><span style="color:#0000bb;">shmop_open</span><span style="color:#007700;">(</span><span style="color:#0000bb;">0xff3</span><span style="color:#007700;">, </span><span style="color:#dd0000;">&#8220;c&#8221;</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0644</span><span style="color:#007700;">, </span><span style="color:#0000bb;">100</span><span style="color:#007700;">);<br />
if (!</span><span style="color:#0000bb;">$shm_id</span><span style="color:#007700;">) {<br />
echo </span><span style="color:#dd0000;">&#8220;Couldn&#8217;t create shared memory segment\n&#8221;</span><span style="color:#007700;">;<br />
}</p>
<p></span><span style="color:#ff8000;">// Get shared memory block&#8217;s size<br />
</span><span style="color:#0000bb;">$shm_size </span><span style="color:#007700;">= </span><span style="color:#0000bb;">shmop_size</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$shm_id</span><span style="color:#007700;">);<br />
echo </span><span style="color:#dd0000;">&#8220;SHM Block Size: &#8221; </span><span style="color:#007700;">. </span><span style="color:#0000bb;">$shm_size </span><span style="color:#007700;">. </span><span style="color:#dd0000;">&#8220; has been created.\n&#8221;</span><span style="color:#007700;">;</p>
<p></span><span style="color:#ff8000;">// Lets write a test string into shared memory<br />
</span><span style="color:#0000bb;">$shm_bytes_written </span><span style="color:#007700;">= </span><span style="color:#0000bb;">shmop_write</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$shm_id</span><span style="color:#007700;">, </span><span style="color:#dd0000;">&#8220;my shared memory block&#8221;</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0</span><span style="color:#007700;">);<br />
if (</span><span style="color:#0000bb;">$shm_bytes_written </span><span style="color:#007700;">!= </span><span style="color:#0000bb;">strlen</span><span style="color:#007700;">(</span><span style="color:#dd0000;">&#8220;my shared memory block&#8221;</span><span style="color:#007700;">)) {<br />
echo </span><span style="color:#dd0000;">&#8220;Couldn&#8217;t write the entire length of data\n&#8221;</span><span style="color:#007700;">;<br />
}</p>
<p></span><span style="color:#ff8000;">// Now lets read the string back<br />
</span><span style="color:#0000bb;">$my_string </span><span style="color:#007700;">= </span><span style="color:#0000bb;">shmop_read</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$shm_id</span><span style="color:#007700;">, </span><span style="color:#0000bb;">0</span><span style="color:#007700;">, </span><span style="color:#0000bb;">$shm_size</span><span style="color:#007700;">);<br />
if (!</span><span style="color:#0000bb;">$my_string</span><span style="color:#007700;">) {<br />
echo </span><span style="color:#dd0000;">&#8220;Couldn&#8217;t read from shared memory block\n&#8221;</span><span style="color:#007700;">;<br />
}<br />
echo </span><span style="color:#dd0000;">&#8220;The data inside shared memory was: &#8221; </span><span style="color:#007700;">. </span><span style="color:#0000bb;">$my_string </span><span style="color:#007700;">. </span><span style="color:#dd0000;">&#8220;\n&#8221;</span><span style="color:#007700;">;</p>
<p></span><span style="color:#ff8000;">//Now lets delete the block and close the shared memory segment<br />
</span><span style="color:#007700;">if (!</span><span style="color:#0000bb;">shmop_delete</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$shm_id</span><span style="color:#007700;">)) {<br />
echo </span><span style="color:#dd0000;">&#8220;Couldn&#8217;t mark shared memory block for deletion.&#8221;</span><span style="color:#007700;">;<br />
}<br />
</span><span style="color:#0000bb;">shmop_close</span><span style="color:#007700;">(</span><span style="color:#0000bb;">$shm_id</span><span style="color:#007700;">);</span></p>
<p><span style="color:#007700;"><br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sukhon007.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sukhon007.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sukhon007.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sukhon007.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sukhon007.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sukhon007.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sukhon007.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sukhon007.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sukhon007.wordpress.com&amp;blog=8112284&amp;post=1&amp;subd=sukhon007&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sukhon007.wordpress.com/2009/06/10/shared-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b3faf07b8d4643dd93f67a1cdeb855d9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mgsukhon</media:title>
		</media:content>
	</item>
	</channel>
</rss>
