cvs: presentations /slides/intro 24.png carl.jpg new_apc.xml php5_construct.xml php5_private.xml php5_protected.xml php5_refclone.xml php5_setget.xml
php_opcode_caches3.xml pi.xml streams.xml urlapi.xml ws2.xml

From: Date: Fri, 29 Apr 2005 23:12:31 +0000
Subject: cvs: presentations /slides/intro 24.png carl.jpg new_apc.xml php5_construct.xml php5_private.xml php5_protected.xml php5_refclone.xml php5_setget.xml
php_opcode_caches3.xml pi.xml streams.xml urlapi.xml ws2.xml
Groups: php.pres 
Request: Send a blank email to pres+get-1125@lists.php.net to get a copy of this message
rasmus Fri Apr 29 19:12:31 2005 EDT Added files: /presentations/slides/intro 24.png Modified files: /presentations/slides/intro carl.jpg new_apc.xml php5_construct.xml php5_private.xml php5_protected.xml php5_refclone.xml php5_setget.xml php_opcode_caches3.xml pi.xml streams.xml urlapi.xml ws2.xml Log: Missing image and some slide changes

http://cvs.php.net/diff.php/presentations/slides/intro/carl.jpg?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/carl.jpg http://cvs.php.net/diff.php/presentations/slides/intro/new_apc.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/new_apc.xml diff -u presentations/slides/intro/new_apc.xml:1.2 presentations/slides/intro/new_apc.xml:1.3 --- presentations/slides/intro/new_apc.xml:1.2 Tue Oct 26 13:53:02 2004 +++ presentations/slides/intro/new_apc.xml Fri Apr 29 19:12:30 2005 @@ -8,8 +8,8 @@ <bullet>Quick way to load constants from shared memory</bullet> </list> -<example title="apc_store/fetch" result="1"><![CDATA[<?php - $a = array(1,2,3,4,5); +<example title="apc_store/fetch"><![CDATA[<?php + $a = array(1,2,3); apc_store('my_array', $a, 5); $a = 0; echo "<pre>"; var_dump($a); echo "</pre>"; @@ -17,15 +17,22 @@ echo "<pre>"; var_dump($b); echo "</pre>"; ?>]]></example> +<!-- Cheating to make sure the slide will work without APC --> +<example hide="1" result="1"><![CDATA[<?php + $a = array(1,2,3); + echo "<pre>"; var_dump($a); echo "</pre>"; + $b = $a; + echo "<pre>"; var_dump($b); echo "</pre>"; +?>]]></example> + <break lines="1" /> -<example title="save/load constants" result="1"><![CDATA[<?php +<example title="save/load constants"><![CDATA[<?php if(!apc_load_constants('my_constants')) { $constants = array('ABC'=>'testing', 'DEF'=>123, 'FOO'=>'Bar'); apc_define_constants('my_constants', $constants); } - echo ABC,DEF,FOO; ?>]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/php5_construct.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/intro/php5_construct.xml diff -u presentations/slides/intro/php5_construct.xml:1.1 presentations/slides/intro/php5_construct.xml:1.2 --- presentations/slides/intro/php5_construct.xml:1.1 Tue Jan 20 13:37:15 2004 +++ presentations/slides/intro/php5_construct.xml Fri Apr 29 19:12:30 2005 @@ -1,18 +1,24 @@ <slide title="PHP5 OO - *structors"> -<example title="Constructors and Destructors"><![CDATA[<?php +<example title="Constructors and Destructors" result="1"><![CDATA[<?php class OS { function __construct($name) { - echo "begin"; + echo "Constructor called<br />"; } function __destruct() { - echo "done"; + echo "Destructor called<br />"; } } $linux = new OS('linux'); + echo "Step 1<br />"; + $ref = $linux; + echo "Step 2<br />"; $linux = NULL; + echo "Step 3<br />"; + $ref = NULL; + echo "Step 4<br />"; ?>]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/php5_private.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/php5_private.xml diff -u presentations/slides/intro/php5_private.xml:1.2 presentations/slides/intro/php5_private.xml:1.3 --- presentations/slides/intro/php5_private.xml:1.2 Sat Jul 17 17:30:08 2004 +++ presentations/slides/intro/php5_private.xml Fri Apr 29 19:12:30 2005 @@ -19,5 +19,5 @@ echo $br->action. "\n"; ?>]]></example> -<example hide="1" result="1"><![CDATA[Fatal error: Cannot access private property bedroom::$action in foo.php on line 12]]></example> +<example hide="1" result="1"><![CDATA[Fatal error: Cannot access private property bedroom::$action in foo.php on line 11]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/php5_protected.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/php5_protected.xml diff -u presentations/slides/intro/php5_protected.xml:1.2 presentations/slides/intro/php5_protected.xml:1.3 --- presentations/slides/intro/php5_protected.xml:1.2 Sat Jul 17 17:30:08 2004 +++ presentations/slides/intro/php5_protected.xml Fri Apr 29 19:12:30 2005 @@ -1,7 +1,7 @@ <slide title="PHP5 OO - Protected"> <blurb> -Only accessable/callable by the same, or an inherited class. +Only accessible/callable by the same, or an inherited class. Here we see a call to a protected method from the global scope being rejected. </blurb> @@ -33,6 +33,6 @@ ?>]]></example> <example hide="1" result="1"><![CDATA[fun<br /> -Fatal error: Call to protected method Bedroom::peek() from context '' in script.php on line 24]]></example> +Fatal error: Call to protected method Bedroom::peek() from context 'html' in script.php on line 24]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/php5_refclone.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/php5_refclone.xml diff -u presentations/slides/intro/php5_refclone.xml:1.2 presentations/slides/intro/php5_refclone.xml:1.3 --- presentations/slides/intro/php5_refclone.xml:1.2 Tue Feb 3 12:58:34 2004 +++ presentations/slides/intro/php5_refclone.xml Fri Apr 29 19:12:30 2005 @@ -1,6 +1,6 @@ <slide title="PHP5 OO - References"> -<example title="In PHP4" result="1"><![CDATA[<?php +<example title="In PHP4"><![CDATA[<?php class OS { var $name; function OS($name) { @@ -19,6 +19,9 @@ echo $win->name; ?>]]></example> +<example hide="1" result="1"><![CDATA[linux<br /> +windows]]></example> + <example title="In PHP5"><![CDATA[<?php class OS { var $name; @@ -38,5 +41,8 @@ echo $win->name; ?>]]></example> +<example hide="1" result="1"><![CDATA[linux<br /> +windows]]></example> + </slide> http://cvs.php.net/diff.php/presentations/slides/intro/php5_setget.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/php5_setget.xml diff -u presentations/slides/intro/php5_setget.xml:1.2 presentations/slides/intro/php5_setget.xml:1.3 --- presentations/slides/intro/php5_setget.xml:1.2 Sat Jul 17 17:30:08 2004 +++ presentations/slides/intro/php5_setget.xml Fri Apr 29 19:12:30 2005 @@ -7,16 +7,16 @@ <example fontsize="2em"><![CDATA[<?php class OSses { - private $names = array(); + private $names = array(); - public function __set($name, $value) { - if (!in_array($name, array('windows', 'dos'))) - $this->names[$name] = $value; - } + public function __set($name, $value) { + if (!in_array($name, array('windows', 'dos'))) + $this->names[$name] = $value; + } - public function getNames() { - return $this->names; - } + public function getNames() { + return $this->names; + } } $osses = new OSses(); http://cvs.php.net/diff.php/presentations/slides/intro/php_opcode_caches3.xml?r1=1.3&r2=1.4&ty=u Index: presentations/slides/intro/php_opcode_caches3.xml diff -u presentations/slides/intro/php_opcode_caches3.xml:1.3 presentations/slides/intro/php_opcode_caches3.xml:1.4 --- presentations/slides/intro/php_opcode_caches3.xml:1.3 Wed Sep 22 15:15:35 2004 +++ presentations/slides/intro/php_opcode_caches3.xml Fri Apr 29 19:12:30 2005 @@ -1,7 +1,5 @@ <slide title="APC Stats"> -<example filename="apc.php" marginleft="1em" marginright="0em" hide="1" result="1" type="iframe" iheight="1450"/> +<example filename="http://lerdorf.com/apc.php" marginleft="1em" marginright="0em" hide="1" result="1" type="iframe" iheight="1000"/> -<blurb> -</blurb> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/pi.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/pi.xml diff -u presentations/slides/intro/pi.xml:1.2 presentations/slides/intro/pi.xml:1.3 --- presentations/slides/intro/pi.xml:1.2 Tue Apr 12 17:39:05 2005 +++ presentations/slides/intro/pi.xml Fri Apr 29 19:12:30 2005 @@ -3,7 +3,7 @@ $PATH_INFO is your friend when it comes to creating clean URLS. Take for example this URL: </blurb> -<example format="text">http://www.company.com/products/routers</example> +<example type="link">http://www.company.com/products/routers</example> <blurb> If the Apache configuration contains this block: </blurb> http://cvs.php.net/diff.php/presentations/slides/intro/streams.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/streams.xml diff -u presentations/slides/intro/streams.xml:1.2 presentations/slides/intro/streams.xml:1.3 --- presentations/slides/intro/streams.xml:1.2 Sat Jul 17 17:30:08 2004 +++ presentations/slides/intro/streams.xml Fri Apr 29 19:12:30 2005 @@ -2,31 +2,14 @@ <break /> -<example><![CDATA[<?php +<example result="1"><![CDATA[<?php echo "<pre>"; print_r(stream_get_wrappers()); print_r(stream_get_filters()); + print_r(stream_get_transports()); echo "</pre>"; ?>]]></example> -<example fontsize="1.8em" hide="1" result="1"><![CDATA[Array<br /> -(<br /> - [0] => php<br /> - [1] => file<br /> - [2] => http<br /> - [3] => ftp<br /> - [4] => compress.zlib<br /> -)<br /> -<br /> -Array<br /> -(<br /> - [0] => string.rot13<br /> - [1] => string.toupper<br /> - [2] => string.tolower<br /> - [3] => string.strip_tags<br /> - [4] => convert.*<br /> -)]]></example> - <example title="Examples" fontsize="1.4em"><![CDATA[<?php readfile("php://filter/read=string.toupper/resource=http://www.example.com"); @@ -47,4 +30,10 @@ stream_copy_to_stream($src, $dest2); ?>]]></example> +<example title="file_put_contents" fontsize="1.4em"><![CDATA[<?php +$stream = fopen($url,'r'); +$dest1 = fopen('first1k.txt','w'); +stream_copy_to_stream($stream, $dest1, 1024); +file_put_contents('remainder.txt', $stream); +?>]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/urlapi.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/intro/urlapi.xml diff -u presentations/slides/intro/urlapi.xml:1.2 presentations/slides/intro/urlapi.xml:1.3 --- presentations/slides/intro/urlapi.xml:1.2 Tue Apr 12 17:39:05 2005 +++ presentations/slides/intro/urlapi.xml Fri Apr 29 19:12:30 2005 @@ -1,6 +1,6 @@ <slide title="URL API"> <break lines="1" /> -<example fontsize="3em" format="text"><![CDATA[http://www.example.com/a/b?c=1&d=2]]></example> +<example fontsize="3em" type="link"><![CDATA[ http://www.example.com/a/b?c=1&d=2]]></example> <blurb fontsize="4em">|ff0000|/a/b| is what we are looking for</blurb> <blurb fontsize="4em">|ff0000|?c=1&amp;d=2| are optional modifiers</blurb> </slide> http://cvs.php.net/diff.php/presentations/slides/intro/ws2.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/intro/ws2.xml diff -u presentations/slides/intro/ws2.xml:1.1 presentations/slides/intro/ws2.xml:1.2 --- presentations/slides/intro/ws2.xml:1.1 Tue Apr 12 17:39:05 2005 +++ presentations/slides/intro/ws2.xml Fri Apr 29 19:12:30 2005 @@ -1,4 +1,5 @@ <slide title="SOAP Server"> +<break /> <example fontsize="1.5em"><![CDATA[<?php function Add($x,$y) { return $x+$y;
« previous php.pres (#1125) next »