<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 22 May 2013 07:44:46 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Feichtinger's Blog: PHP5 WebSocket Example - A Simple Chat]]></title>
      <guid>http://www.phpdeveloper.org/news/15850</guid>
      <link>http://www.phpdeveloper.org/news/15850</link>
      <description><![CDATA[<p>
<i>Michael Feichtinger</i> has posted <a href="http://bohuco.net/blog/2011/01/php5-websocket-example-a-simple-chat/">a simple websocket example</a> to his blog today. It shows the creation of a simple "web chat" application for real-time communication without the mess that can come with ajax.
</p>
<blockquote>
The classic example for websockets is a chat. This chat example has only 200 lines of code (excl. the Websocket class), is really easy to understand and customizable.
</blockquote>
<p>
He creates a basic "WebsocketClass" class that (in his example) connects to an IP and port. It uses JSON as the messaging format and some basic javascript to handle the clicks of the "chat" and "login" buttons. You can see an example in action <a href="http://bohuco.net/labs/php-websocket-chat/">here</a> and download the source for the <a href="http://bohuco.net/labs/php-websocket-chat/?source=server.php">server.php here</a>.
</p>]]></description>
      <pubDate>Thu, 03 Feb 2011 09:47:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Wojciech Sznapka's Blog: Accessing private object property from other object in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15439</guid>
      <link>http://www.phpdeveloper.org/news/15439</link>
      <description><![CDATA[<p>
<i>Wojciech Sznapka</i> has a new post to his blog showing an interesting OOP programming strick related to <a href="http://blog.sznapka.pl/accessing-private-object-property-from-other-object/">accessing private properties</a> in one object from another if they're derived from the same class.
</p>
<blockquote>
Last time I wrote about <a href="http://blog.sznapka.pl/weirdest-php-construction-ive-ever-seen/">Weirdest PHP construction I've ever seen</a>, now I found another unusual PHP solution. PHP offers 3 visibility modifiers: private, protected and public. Private properties and methods can't be accessed outside the object, as well as from inherited classes. With one exception... They can be accessed by other instances of the same class. You can read more about it in the <a href="http://www.php.net/manual/en/language.oop5.visibility.php#language.oop5.visibility-other-objects">PHP manual</a>.
</blockquote>
<p>
In his code example he shows how to create two objects of the Foo class and, using getters and setters change the value of a private property from the first object on the second object.
</p>]]></description>
      <pubDate>Tue, 16 Nov 2010 12:25:53 -0600</pubDate>
    </item>
  </channel>
</rss>
