php»ù´¡±Ê¼Ç Arrow difference
/***************************by
garcon1986********************************/
<?php
// -> ÊÇÖ¸¶ÔÏóµÄ·½·¨»òÕßÊôÐÔ
class Cart{
public function add_item($a,$b){
echo $a+$b.'<br>';
}
}
//$cart = new Cart; Á½¾äÒâÒåÏàͬ
$cart = new Cart();
$cart->add_item("10", 1);
// => Êý×éµÄÔªËظ³Öµ
//¼üÖµone¶ÔÓ¦µÄÖµÊÇ1, ¼üÖµtwo¶ÔÓ¦µÄÖµÊÇ2,¼üÖµ¶ÔÓ¦µÄÖµÊÇ3.
$a = array("one"=>1, "two"=>2, "three"=>3);
echo $a["one"].'<br>';
echo $a["two"].'<br>';
echo $a["three"].'<br>';
//$key=>$value Ö¸¼üÖµ¶ÔÓ¦µÄÖµ
foreach($a as $key => $value){
echo "The \$key is: $key, The \$value is: $value<br>";
}
?>
Ïà¹ØÎĵµ£º
GoogleΪȫÇòÖ÷Òª³ÇÊÐÌṩÁËͳһµÄÌìÆøÔ¤±¨Êý¾Ý´æ´¢¸ñʽ£¬ÄǾÍÊÇXML¡£ËùÓеĿª·¢Õ߶¼¿ÉÒÔÀûÓÃ×Ô¼ºÏ²»¶µÄÓïÑÔÀ´½âÎöXML»ñÈ¡ËùÐè³ÇÊеÄÌìÆøÔ¤±¨£¬±¾ÎĽ«½éÉÜÀûÓÃPHPÀ´»ñÈ¡ÎÒËùÔÚ³ÇÊмÃÄϵÄÌìÆøÔ¤±¨¡£
ÔÎļû±¾ÈËÍøÕ¾¡¾PHP̽·Õß¡¿
ÔÎÄÁ´½Ó£º
PHP5 ¶ÁÈ¡Google ÌìÆøÔ¤±¨XML API ......
ÔÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/10/1-13/
PHPÖÐÒ»¸ö»ù±¾µÄ½Å±¾ÓÉÁ½²¿·Ö×é³É£ºÖ÷³ÌÐòºÍº¯Êý¡£
º¯Êý²»½ö¿ÉÒÔ¹¹³ÉÒ»¸öPHP½Å±¾µÄ»ù±¾¹¦ÄÜ£¬Ò²Ê¹µÃ³ÌÐò½á¹¹»¯£¬ÓÐÖúÓÚ³ÌÐò´úÂëµÄÖØÓá£
PHPº¯ÊýµÄµ÷ÓÃ
ͨ¹ý°´ÕÕº¯Êý¸ñʽд³öº¯ÊýÒÔ¼°ÏàÓ¦µÄ²ÎÊý¼´¿É£¬ÒÂÓï·¨ÈçÏ£º
String¡¡substr(string¡¡str,int¡¡start) ......
¿´
µ½ÕâƪÎÄÕÂ
£¬µ±Ê±¾ÍÀá±¼Á˺ü¸»Ø£¬ÖصãÍƼöÏ£¬Ë³±ãÎÒ×Ô¼ºÒ²×ö¸öÕûÀí¡£
sys_getloadavg()
Õâ¸öº¯Êý
·µ»Øµ±Ç°ÏµÍ³µÄ¸ºÔؾùÖµÐÅÏ¢
£¨µ±È» Windows
ϲ»ÊÊÓã©£¬ÏêϸÎĵµ¿ÉÒÔ·ÔÄ PHP µÄÏà¹ØÎĵµ¡£ÎĵµÖÐÓжÎʾÀý´úÂ룬»ù±¾ÉÏÒ²¾ÍÄÜ¿´³öËüµÄÓÃ;ÁË¡£
<?php
$load = sys_getloadavg();
if ($load[0] > 80) ......
¡¶Head First
Éè¼Æģʽ¡·ÊDZ¾²»´íµÄ½²½âÉè¼ÆģʽµÄÊ飬²»ÏñF4дµÄÄÇô¿ÝÔӦ¸ÃËãÊDZȽÏÈÝÒ×Àí½âµÄºÃÊé¡£ÊéÖеÄÀý×Ó¶¼±È½ÏdzÏÔÒ׶®£¬²»¹ýÓÉÓÚÊÇÍâ¹úÀÐдµÄ£¬ËùÒÔÀý×Ó
µÄÏ°¹ß²»ÊǺܸ½ºÏÖйúÌØÉ«£¬¿ÉÄÜż¶û¿´ÆðÀ´ÓÐЩ±ðŤ£¬»¹ÓÐÓïÑÔÏ°¹ßÒ²²»ÊÇÖйú·ç¡£µ±È»¿´¹ýÕâ±¾ÊéÖ®ºó£¬Äã²ÅÄÜÉî¿ÌÀí½âÉè¼Æģʽµ½µ×ÄÜΪÄã½â¾öÄÄЩ
퉣 ......
/***************************by
garcon1986********************************/
<?php
//if Óï¾ä
$a = $b = 3;
if($a = $b)
print "a is equal to b<br>";
//else Óï¾ä
if($a < $b){
print "a is smaller than b";
} else {
print "a is not smaller than b<br> ......