<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Let's PHPing...</title>
	<atom:link href="http://shaymol.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shaymol.wordpress.com</link>
	<description>The dumbest people I know are those who know it all - Malcolm Forbes</description>
	<pubDate>Sun, 08 Jun 2008 12:53:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>KISS Phylosophy</title>
		<link>http://shaymol.wordpress.com/2008/05/25/kiss-phylosophy/</link>
		<comments>http://shaymol.wordpress.com/2008/05/25/kiss-phylosophy/#comments</comments>
		<pubDate>Sun, 25 May 2008 06:26:04 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[AdHoc]]></category>

		<category><![CDATA[design]]></category>

		<category><![CDATA[dry]]></category>

		<category><![CDATA[kiss]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/?p=24</guid>
		<description><![CDATA[All we know the English term  KISS  
But in case of software development or engineering  it has special meaning which is a prerequisite to make robust software.
It is widely used as the following variant.

Keep It Simple, Stupid
Keep It Sweet &#38; Simple
Keep It Short &#38; Simple

The main these behind these is to avoid [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>All we know the English term  KISS <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But in case of software development or engineering  it has special meaning which is a prerequisite to make robust software.</p>
<p>It is widely used as the following variant.</p>
<ul>
<li>Keep It Simple, Stupid</li>
<li>Keep It Sweet &amp; Simple</li>
<li>Keep It Short &amp; Simple</li>
</ul>
<p>The main these behind these is to avoid complexity, always try to make things simple , no simpler so that anyone (related with that development) can understand whats going on</p>
<p>There are also other terms like OAOO (One and Only Once) and DRY( Dont Repeat Yourself). These are also very important term in software developemnt. In OO (Object Oriented) design we need to reduce duplication as duplication may increase difficulty of change. It also decrease clarity of the system.</p>
<p>For more info follow the following link<br />
<a href="http://en.wikipedia.org/wiki/KISS_principle">KISS </a><br />
<a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">DRY</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=24&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2008/05/25/kiss-phylosophy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Static Method Inheritance</title>
		<link>http://shaymol.wordpress.com/2007/12/25/static-method-inheritance/</link>
		<comments>http://shaymol.wordpress.com/2007/12/25/static-method-inheritance/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 16:48:38 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[ZEND PHP5 Exam]]></category>

		<category><![CDATA[inheritence]]></category>

		<category><![CDATA[late static binding]]></category>

		<category><![CDATA[self]]></category>

		<category><![CDATA[static]]></category>

		<category><![CDATA[static binding]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/25/static-method-inheritance/</guid>
		<description><![CDATA[We know static methods are callable without instantiating objects. But if it is used from explicit class name, php violates inheritance rule by referencing the current class instead of the called class. Moreover if we use &#8217;self&#8217; to call the method , it will represent the current class.
Lets see the following code

class BaseClass
{
static function dump()
{
echo [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We know static methods are callable without instantiating objects. But if it is used from explicit class name, php violates inheritance rule by referencing the current class instead of the called class. Moreover if we use &#8217;self&#8217; to call the method , it will represent the current class.</p>
<p>Lets see the following code<br />
<code><br />
class BaseClass<br />
{<br />
static function dump()<br />
{<br />
echo __CLASS__ . &#8216;::dump()&#8217;;<br />
}<br />
static function callDump()<br />
{<br />
self::dump(); // self represents the current class<br />
}<br />
}</code><br />
<code><br />
class ChildClass extends BaseClass<br />
{<br />
static function dump()<br />
{<br />
echo __CLASS__. &#8216;::dump()&#8217;;<br />
}<br />
}<br />
ChildClass::callDump();<br />
</code><br />
In the above code , what the inheritance rule says , it says that the output is supposed to ChildClass::dump() but real output is BaseClass::dump(). This is because &#8217;self&#8217; always represents the current class.</p>
<p>To solve this limitation PHP introduce Late Static Binding (LSB) from PHP version 5.3.0 that can be used to reference the current class. It is represented as &#8217;static::&#8217;. So the above code will be as following</p>
<p><code><br />
class BaseClass<br />
{<br />
static function dump()<br />
{<br />
echo __CLASS__ . &#8216;::dump()&#8217;;<br />
}</code><br />
<code><br />
static function callDump()<br />
{<br />
static::dump(); // static refers the called class<br />
}<br />
}<br />
</code><code><br />
class ChildClass extends BaseClass<br />
{<br />
static function dump()<br />
{<br />
echo __CLASS__. &#8216;::dump()&#8217;;<br />
}<br />
}</code><code><br />
ChildClass::callDump();<br />
</code></p>
<p>Now the above code will output ChildClass::dump(), but &#8217;static::&#8217; is available from PHP version 5.3.0</p>
<p>For more info please visit the following links<br />
<a href="http://www.php.net/manual/en/language.oop5.static.php"> Static Keyworkd </a><br />
<a href="http://www.php.net/manual/en/language.oop5.late-static-bindings.php"> Late Static Binding </a></p>
<p>Thank$<br />
$haymoL<br />
eXpLoRinG PHP</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=18&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/25/static-method-inheritance/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Custom 404 not found and so on&#8230;</title>
		<link>http://shaymol.wordpress.com/2007/12/18/custom-404-not-found-and-so-on/</link>
		<comments>http://shaymol.wordpress.com/2007/12/18/custom-404-not-found-and-so-on/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 17:09:16 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[error code]]></category>

		<category><![CDATA[error message]]></category>

		<category><![CDATA[errorDocuemnt]]></category>

		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/18/custom-404-not-found-and-so-on/</guid>
		<description><![CDATA[We are familiar with 404 not found error. it happens when the requested file is not found. But we can customize this error message.
There are some other apache error codes. We can categorize few of them as follows

Client Request Errors

400 - Bad Syntax
401 - Authorization Required
404 - Not Found - most common


Server Request Errors

500 - [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We are familiar with 404 not found error. it happens when the requested file is not found. But we can customize this error message.</p>
<p>There are some other apache error codes. We can categorize few of them as follows</p>
<ul>
<li>Client Request Errors
<ul>
<li>400 - Bad Syntax</li>
<li>401 - Authorization Required</li>
<li>404 - Not Found - most common</li>
</ul>
</li>
<li>Server Request Errors
<ul>
<li>500 - Internal Server Error</li>
</ul>
</li>
</ul>
<p>To customize the error message we need to follow the following steps</p>
<ul>
<li>First, create the HTML page (e404.php) that we want to use as your error message and save it into the home directory</li>
<li>Add the following line in the .htaccess file
<ul>
<li>ErrorDocument 404 /e404.php</li>
</ul>
</li>
<li>These two files are stored in the home directory (/htdocs/e404.php, /htdocs/.htaccess)</li>
<li>Now lets test it . From the browser address bar request (http://localhost/invalidScriptName) for any script that are not eixsts physically and the custom messages will be shown that are used in the e404.php</li>
</ul>
<p>Thanks<br />
$haymoL<br />
eXploRinG Apache</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=17&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/18/custom-404-not-found-and-so-on/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP as Apache module</title>
		<link>http://shaymol.wordpress.com/2007/12/18/php-as-apache-module/</link>
		<comments>http://shaymol.wordpress.com/2007/12/18/php-as-apache-module/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 15:19:33 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[htaccess]]></category>

		<category><![CDATA[php configuration settings]]></category>

		<category><![CDATA[php_value]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/18/php-as-apache-module/</guid>
		<description><![CDATA[We can use php.ini directives configuration settings such as error_reporting, display_errors, auto_prepend_file etc from apache configuration files (httd.conf or .htaccess file).
Lets we want to append a config file (ex. init.php) at the beginning of a script(index.php).  So we need to add the following statement in our .htaccess file.

1. init.php  sample file
&#60;?
define(&#8221;DOCUMENT_ROOT&#8221; , $_SERVER['DOCUMENT_ROOT']);
define(&#8221;DISPLAY_ERROR&#8221; [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We can use php.ini directives configuration settings such as error_reporting, display_errors, auto_prepend_file etc from apache configuration files (httd.conf or .htaccess file).</p>
<p>Lets we want to append a config file (ex. init.php) at the beginning of a script(index.php).  So we need to add the following statement in our .htaccess file.</p>
<p><code><br />
1. init.php  sample file<br />
&lt;?<br />
define(&#8221;DOCUMENT_ROOT&#8221; , $_SERVER['DOCUMENT_ROOT']);<br />
define(&#8221;DISPLAY_ERROR&#8221; , 1);<br />
?&gt;</code><br />
<code><br />
2. index.php sample file<br />
&lt;?<br />
print_r(DOCUMENT_ROOT);<br />
?&gt;<br />
</code><br />
<code><br />
3..htaccess file<br />
#php_value name value<br />
#Can be used only with PHP_INI_ALL and PHP_INI_PERDIR type directives. </code></p>
<p><code>php_value auto_prepend_file init.php<br />
</code></p>
<p>N.B. All the files needs to should be store in the same directory as we use htaccess which used as per directory level. So all the php scripts in that directory will prepend the init.php file.</p>
<p>Now we are ready to test the script.</p>
<p>There are lots of <a href="http://www.php.net/manual/en/ini.php#ini.list">php ini directives</a> that can be altered from apache module.</p>
<p>For more info please visit <a href="http://www.php.net/manual/en/configuration.changes.php">the php manual</a></p>
<p>Cheer$<br />
$haymoL<br />
eXplOrinG PHP</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=15&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/18/php-as-apache-module/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GNU Wget for downloading files</title>
		<link>http://shaymol.wordpress.com/2007/12/16/gnu-wget-for-downloading-files/</link>
		<comments>http://shaymol.wordpress.com/2007/12/16/gnu-wget-for-downloading-files/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 11:34:15 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[file download using wget]]></category>

		<category><![CDATA[linux command]]></category>

		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/16/gnu-wget-for-downloading-files/</guid>
		<description><![CDATA[wget is a GNU free software that can be used to retrieve  files using HTTP, HTTPS , FTP, FTPS. It can be used as a commend line from terminal as well as from scripts and cron jobs.
By default, Wget is very simple to invoke.
The basic syntax is:
wget [option]&#8230; [URL]
wget -r &#8211;tries=10 http://example.com/

There are many [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>wget is a GNU free software that can be used to retrieve  files using HTTP, HTTPS , FTP, FTPS. It can be used as a commend line from terminal as well as from scripts and cron jobs.</p>
<p>By default, Wget is very simple to invoke.<br />
The basic syntax is:<code><br />
wget [<var>option</var>]&#8230; [<var>URL</var>]<br />
wget -r &#8211;tries=10 http://example.com/<br />
</code></p>
<p>There are many options you can set such as startup options, login and input file options, download options, directory options etc.</p>
<p>For more info you can visit the following urls:<br />
<a href="http://www.gnu.org/software/wget/">GNU Wget </a> | <a href="http://www.gnu.org/software/wget/manual/wget.html">GNU Wget Manual</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=14&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/16/gnu-wget-for-downloading-files/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Operator Precedence in PHP</title>
		<link>http://shaymol.wordpress.com/2007/12/16/operator-precedence/</link>
		<comments>http://shaymol.wordpress.com/2007/12/16/operator-precedence/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 21:57:09 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[ZEND PHP5 Exam]]></category>

		<category><![CDATA[Bitwise Operator]]></category>

		<category><![CDATA[Operator Precedence]]></category>

		<category><![CDATA[Ternary Operator]]></category>

		<category><![CDATA[Zend PHP5 Certification]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/16/operator-precedence/</guid>
		<description><![CDATA[The precedence of an operator specifies how &#8220;tightly&#8221; it binds two expressions  together. Lets play with few of them

&#8216;[' is left associative and has higher precedence than assignment operator '='
function one($str)
{
echo "$str";
return 1;
}
$a = array(1,2);
$a[one("A")] = $a[one("B")] = 1; // outputs AB
Assignment Operators are right associative
function output(&#38; $b)
{
echo( &#8220;b value is: &#8220;.$b );
return $b;
}
$a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The precedence of an operator specifies how &#8220;tightly&#8221; it binds two expressions  together. Lets play with few of them</p>
<ol>
<li>&#8216;[' is left associative and has higher precedence than assignment operator '='<code><br />
function one($str)<br />
{<br />
echo "$str";<br />
return 1;<br />
}<br />
$a = array(1,2);<br />
$a[one("A")] = $a[one("B")] = 1; // outputs AB</code></li>
<li>Assignment Operators are right associative<code><br />
function output(&amp; $b)<br />
{<br />
echo( &#8220;b value is: &#8220;.$b );<br />
return $b;<br />
}<br />
$a = 2;<br />
$b = 5;<br />
echo ($a = $b = 1);<br />
$a = 2;<br />
$b = 5;<br />
echo ( &#8220;a value is: &#8220;.$a = output($b) );<br />
?&gt;<br />
Output is:<br />
1<br />
b value is: 5<br />
a value is: 5<br />
</code></li>
<li>     Comparison Operator always returns TRUE/FALSE<code><br />
$b = 5;<br />
$a = ( ( ++$b ) &gt; 5 ); // Pre-increment test<br />
echo (int)$a;            // Output 1<br />
$b = 5;<br />
$a = ( ( $b++ ) &gt; 5 ); // Post-increment test<br />
echo (int)$a;            // Output 0<br />
</code></li>
<li>     assignment operator has higher precedence than bitwise operator<code><br />
( 9 &amp; 8 == 8 ) ? &#8216;true&#8217;:'false&#8217;; //same as 9 &amp; ( 8 == 8 ) which is true<br />
( 8 &amp; 8 == 8 ) ? &#8216;true&#8217;:'false&#8217;; //same as 8 &amp; ( 8 == 8 ) which is false<br />
</code></li>
<li>Logical Operator Precedence : and, or, nor, !, &amp;&amp;, ||<code><br />
$a &amp;&amp; $b || $c;  // equivalent to </code><code>(a and b) or c</code><br />
<code> $a AND $b || $c; // equivalent to </code><code>a and (b or c)</code><br />
<code>again<br />
$a = $b &amp;&amp; $c;   // equivalent to $a = (</code><code>$b &amp;&amp; $c</code><code>)<br />
$a = $b AND $c;  // </code><code>equivalent to ($a = </code><code>$b) &amp;&amp; $c</code><code><br />
</code></li>
<li>The ternary operator is a statement, and that it doesn&#8217;t evaluate to a variable, but to the result of a statement<code><br />
echo (true?&#8217;true&#8217;:false?&#8217;t':&#8217;f');  // equivalent to                    echo ((true ? &#8216;true&#8217; : &#8216;false&#8217;) ? &#8216;t&#8217; : &#8216;f&#8217;);</code></li>
</ol>
<p>Reference : <a href="http://www.php.net/manual/en/language.operators.php"> PHP Manual</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=13&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/16/operator-precedence/feed/</wfw:commentRss>
		</item>
		<item>
		<title>URL Manipulation using mod_rewrite</title>
		<link>http://shaymol.wordpress.com/2007/12/16/url-manipulation-using-mod_rewrite/</link>
		<comments>http://shaymol.wordpress.com/2007/12/16/url-manipulation-using-mod_rewrite/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 20:11:54 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[htaccess]]></category>

		<category><![CDATA[mod_rewrite]]></category>

		<category><![CDATA[rewrite rule]]></category>

		<category><![CDATA[seo]]></category>

		<category><![CDATA[url manipulation]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/16/url-manipulation-using-mod_rewrite/</guid>
		<description><![CDATA[What It is
mod_rewrite is frequently called the &#8220;Swiss Army Knife&#8221; of URL Manipulation.  mod_rewrite is used for rewriting and redirecting URLs dynamically, using powerful pattern matching.
The most common use of mod_rewrite is to make ugly URL most attractive.  For example , say our URL looks like http://www.example.com/index.php?cmd=login , and we want to show [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>What It is</strong><br />
mod_rewrite is frequently called the &#8220;Swiss Army Knife&#8221; of URL Manipulation.  mod_rewrite is used for rewriting and redirecting URLs dynamically, using powerful pattern matching.<br />
The most common use of mod_rewrite is to make ugly URL most attractive.  For example , say our URL looks like http://www.example.com/index.php?cmd=login , and we want to show the url in the address bar as http://www.example.com/login. To do this we need to use the following.<br />
<code><br />
# First make the RewriteEngine On<br />
RewriteEngine On<br />
# Translate login to /index.php?cmd=login<br />
RewriteRule ^login$ /index.php?cmd=login [L]<br />
</code></p>
<p><strong>Installing mod_rewrite</strong><br />
Because of its popularity, mod_rewrite is now included with all common Apache distributions. We can verify if your Apache installation has the mod_rewrite module by looking for a file named mod_rewrite.so under the modules folder in our Apache installation directory.<br />
To make sure open up the httpd.conf file in the Apache conf folder and find the following<br />
#LoadModule rewrite_module modules/mod_rewrite.so<br />
The initail # means it commented out , so to install the mod_rewrite remove the # and restart the Apache. Thats all for mod_rewrite installation.</p>
<p><strong>Testing mod_rewrite</strong><br />
We can write rules in httpd.conf file or in .htaccess file to work for per directory basis. .htaccess is used for customised rules for any specific directory.<br />
Lets create .htaccess file in htdocs folder. and a index.php file that basically dump the POST variable.<br />
<code><br />
index.php file goes as follows<br />
// index.php file that basically do nothing only dump the post variable for this example<br />
$cmd = $GET['login'];<br />
if($cmd == &#8216;login&#8217;)<br />
{<br />
echo &#8221; You are in login Page&#8221;;<br />
}<br />
else<br />
{<br />
echo &#8220;Elsewhere&#8221;;<br />
}<br />
# First make the RewriteEngine On<br />
RewriteEngine On<br />
# Translate login to /index.php?cmd=login<br />
RewriteRule ^login$ /index.php?cmd=login [L]<br />
</code></p>
<p>Now test the above rule using the url : http://www.example.com/login and see the output.</p>
<p>For more info please visit :<a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html"> Apache Mod Rewrite Rule Doc</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=12&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/16/url-manipulation-using-mod_rewrite/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OOP with JavaScript</title>
		<link>http://shaymol.wordpress.com/2007/12/16/oop-with-javascript/</link>
		<comments>http://shaymol.wordpress.com/2007/12/16/oop-with-javascript/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 20:02:18 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[]]></category>

		<category><![CDATA[Object Oriented Javascript]]></category>

		<category><![CDATA[Objects in Javascript]]></category>

		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/16/oop-with-javascript/</guid>
		<description><![CDATA[JavaScript actually implements all objects as nothing but associative arrays. We can test this in the following example. In Javascript objects can be created in many ways as follows.

Simple Object Creation

The simplest way to create an object is using keyword new Object().
          var simpleObject   [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>JavaScript actually implements all objects as nothing but associative arrays. We can test this in the following example. In Javascript objects can be created in many ways as follows.</p>
<ul>
<li><strong>Simple Object Creation</strong>
<ul>
<li>The simplest way to create an object is using keyword new Object().</li>
<li><code>          var simpleObject       = new Object();<br />
simpleObject.firstName = &#8216;Foo&#8217;;<br />
simpleObject.lastName  = &#8216;Bar&#8217;;<br />
simpleObject.alertName = function()<br />
{<br />
alert(&#8217;My Name is : &#8216; + this.firstName + &#8216; &#8216; + this.lastName);<br />
}</code></li>
<li><code></code> If we call simpleObject.alertName() or simpleObject.['alertName']() it will alert the firstName and lastName using concatenation</li>
</ul>
</li>
<li><strong>JSON </strong>
<ul>
<li>Basically we use JSON with the Ajax Request. But JSON is actually a core part of Javascript Specification.            Lets build the previous example using JSON.</li>
<li><code>            var JSONObject =<br />
{<br />
firstName  : &#8220;Foo&#8221;,<br />
lastName   : &#8220;Bar&#8221;,<br />
alertName  : function()<br />
{<br />
alert(&#8217;My Name is : &#8216; + this.firstName + &#8216; &#8216; + this.lastName);<br />
}<br />
};</code></li>
<li>Now if we call JSONObject.alertName() , the same output will be alerted as the previous one.</li>
</ul>
</li>
<li><strong>Prototype</strong>
<ul>
<li>Every single object in JavaScript has a prototype property associated with it. the way it works is that when you construct a new instance of an object, all the properties and methods defined in the prototype of the object are attached to the new instance at runtime</li>
<li><code>          function PrototypeClass()<br />
{<br />
this.firstName = &#8216;Foo&#8217;;<br />
this.lastName  = &#8216;Bar&#8217;;<br />
}<br />
PrototypeClass.prototype.alertName = function()<br />
{<br />
alert(&#8217;My Name is : &#8216; + this.firstName + &#8216; &#8216; + this.lastName);<br />
}<br />
var prototypeObject = new PrototypeClass();<br />
prototypeObject.alertName();  // it will produce the same output as in the previous example.<br />
</code></li>
</ul>
</li>
</ul>
<p><strong>Reference : </strong>&#8220;Practical JavaScript™,DOM Scripting and Ajax Projects&#8221;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=11&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/16/oop-with-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Father of PHP&#8230;</title>
		<link>http://shaymol.wordpress.com/2007/12/05/father-of-php/</link>
		<comments>http://shaymol.wordpress.com/2007/12/05/father-of-php/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 15:48:13 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Father of PHP]]></category>

		<category><![CDATA[PHP/FI]]></category>

		<category><![CDATA[Rasmus Lerdorf]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/05/father-of-php/</guid>
		<description><![CDATA[I like to search with various interesting terms in my firefox search bar. Last night i searched with &#8220;father of php&#8221; and found the father of PHP  . It is Rasmus Lerdorf. He created the PHP/FI as a simple     set of Perl scripts for tracking accesses to his online  [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I like to search with various interesting terms in my firefox search bar. Last night i searched with &#8220;father of php&#8221; and found the father of PHP <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . It is <a href="http://www.wellho.net/picture/rasmus.html"><strong>Rasmus Lerdorf</strong></a>. He created the PHP/FI as a simple     set of Perl scripts for tracking accesses to his online     resume. He is also a PEAR administrator.</p>
<p>If you dont like to believe me just google with &#8220;father of php&#8221; and you will get the answer.</p>
<p>For more info you can visit <a href="http://www.php.net/history"> PHP History Page </a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=10&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/05/father-of-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Manual Says&#8230;</title>
		<link>http://shaymol.wordpress.com/2007/12/01/php-manual-says/</link>
		<comments>http://shaymol.wordpress.com/2007/12/01/php-manual-says/#comments</comments>
		<pubDate>Sat, 01 Dec 2007 18:51:43 +0000</pubDate>
		<dc:creator>shaymol</dc:creator>
		
		<category><![CDATA[AdHoc]]></category>

		<guid isPermaLink="false">http://shaymol.wordpress.com/2007/12/01/php-manual-says/</guid>
		<description><![CDATA[In the PHP  manual  -&#62;  Zend API Section i have found the following.
&#8220;Those who know don&#8217;t talk.
Those who talk don&#8217;t know.&#8221; 
- i am confused now , what about you ???
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="abstract">In the PHP  manual  -&gt;  Zend API Section i have found the following.<a title="AEN262777" name="AEN262777"></a></p>
<p>&#8220;Those who know don&#8217;t talk.</p>
<p>Those who talk don&#8217;t know.&#8221; </p>
<p>- i am confused now , what about you ???</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shaymol.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shaymol.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shaymol.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shaymol.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shaymol.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shaymol.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shaymol.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shaymol.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shaymol.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shaymol.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shaymol.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shaymol.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shaymol.wordpress.com&blog=283640&post=7&subd=shaymol&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://shaymol.wordpress.com/2007/12/01/php-manual-says/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>