Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php »ù´¡±Ê¼Ç boolean integer float

/***************************by
garcon1986********************************/
<?php
// boolean integer float example
$action = false;
if($action == "show version"){
echo "the version is 123".'<br>';
}else if($action == false){
echo "action is false".'<br>';
}else {
echo "action is true".'<br>';
}
//some var_dump exercise ---------- var_dump print the relational information of variables
var_dump((bool)""); //bool(false)
var_dump((bool) 1); //bool(true)
var_dump((bool) 0); //bool(false)
var_dump((bool) -1); //bool(true)
var_dump((bool) -2); //bool(true)
var_dump((bool) "foo"); //bool(true)
var_dump((bool) 2.3e5); //bool(true)
var_dump((bool) array()); //bool(false)
var_dump((bool) array(12)); //bool(true)
var_dump((bool) "false"); //bool(true)
//var_dump
$a = 3;
$b = "s1";
//$c = var_dump($a); // int(3)
$d = var_dump($a, $b);
var_dump((bool)00190); // bool(true)
var_dump(00190); // int(1)
$large_number = 2147483647;
var_dump($large_number);
// output: int(2147483647)
$large_number = 2147483648;
var_dump($large_number);
// output: float(2147483648)
// it's true also for hexadecimal specified integers between 2^31 and 2^32-1:
var_dump( 0xffffffff );
// output: float(4294967295)
// this doesn't go for hexadecimal specified integers above 2^32-1:
var_dump( 0x100000000 );
// output: int(2147483647)
$million = 1000000;
$large_number = 50000 * $million;
var_dump($large_number);
// output: float(50000000000)
var_dump(25/7); //output float(3.5714285714286)
var_dump((int)(25/7)); // int(3)
var_dump((boolean)(25/7));// boolean(true)
var_dump(round (25/7)); // float(4)
//special conditions Warning:Never cast an unknown fraction to integer, as this can sometimes lead to unexpected results.
echo (int)((0.1+0.7)*10); // echoes 7!
echo (int)((0.26-0.1)*100); //echoes 16
?>


Ïà¹ØÎĵµ£º

PHPº¯ÊýµÄ¶¨ÒåÓëʹÓÃ

Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/10/1-13/
PHPÖÐÒ»¸ö»ù±¾µÄ½Å±¾ÓÉÁ½²¿·Ö×é³É£ºÖ÷³ÌÐòºÍº¯Êý¡£
º¯Êý²»½ö¿ÉÒÔ¹¹³ÉÒ»¸öPHP½Å±¾µÄ»ù±¾¹¦ÄÜ£¬Ò²Ê¹µÃ³ÌÐò½á¹¹»¯£¬ÓÐÖúÓÚ³ÌÐò´úÂëµÄÖØÓá£
PHPº¯ÊýµÄµ÷ÓÃ
ͨ¹ý°´ÕÕº¯Êý¸ñʽд³öº¯ÊýÒÔ¼°ÏàÓ¦µÄ²ÎÊý¼´¿É£¬ÒÂÓï·¨ÈçÏ£º
String¡¡substr(string¡¡str,int¡¡start) ......

Linux°²×°apache¡¢phpºÍmysql·½·¨

apacheµÄÔ´Âë°²×° 
½«Ñ¹Ëõ°ü½âѹ֮ºó½øÈëÏàÓ¦µÄĿ¼
./configure \   #--------------------Ô¤±àÒëÃüÁî
"--prefix=/usr/local/apache" \  #--------------------°²×°Â·¾¶Îª“/usr/local/apache”
"--with-included-apr" \
"--enable-so" \ #--------------------¿ªÆôÏàÓ¦µÄÀ©Õ¹Ä£¿é ......

phpÏòMySQL²åÈëÊý¾Ý²»È« ½â¾ö·½·¨

½ñÌìΪÁËһЩÒÑÓÐÊý¾Ýµ¼ÈëMYSQLµÄÊý¾Ý¿â£¬ÎÒдÁËÒ»¸öºÜ¼òµ¥µÄPHP³ÌÐò¡£
³ÌÐò˼·ºÜ¼òµ¥£¬¾ÍÊǶÁÒ»ÌõÊý¾Ý£¬È»ºóÍùMYSQLÀï²åÈëÒ»Ìõ¡£
½á¹û×ÜÊÇ·¢ÏÖ Ã¿´Îµ¼ÈëÖ»Äܵ¼Èë2000Ìõ£¬¾Í×Ô¶¯Í£Ö¹ÁË£¬¶øÇÒûÓÐÈκÎÌáʾ¡£
ÔÚÍøÉÏËѽâ¾ö·½°¸¸÷ÖÖËѲ»µ½¡£
¸Õ¿ªÊ¼»³ÒÉÊÇÄڴ滺³å¸øÉÙÁË£¬µ÷ÁËһϣ¬»¹ÊDz»ÐС£¡£
×îºó·¢ÏÖÒ»¸ö¹æÂÉ£¬¾ÍÊÇ ......

PHP»·¾³ IIS+PHP+MYSQL»·¾³µÄ¼ÜÉè

ºÜ¾ÃûÓÐЩһЩÓÐÓô¦µÄµÄ¶«Î÷ÁË£¡½ñÌì¾Í²»ºúÂÒµÄ䶫Î÷ÁË!дһЩÓÐÓõģ¡µ±È»Ç°ÌáÏÂÊǺܸÐлºÜ¶à¾­³£À´ÎÒ²©¿ÍµÄÅóÓÑһϣ¡¶àл´ó¼Ò£¡£¡£¡£¡£¡
½ñÌìдµÄÊǹØÓÚphp»·¾³¼ÜÉèµÄµÚÒ»ÖÖ·½Ê½£¡µ±È»ÎҾͲ»½ØͼÁË£¡´ó¼ÒÖ»Òª°´ÕÕ²Ù×÷¾Í¿ÉÒÔʵÏֵģ¡
Ò»¡¢°²×° PHP £º±¾ÎÄPHP°²×°Â·¾¶È¡ÎªD:\php\php4\(Ϊ±Ü»ìÏý£¬PHP5.1.x°æ±¾°²×°Â·¾ ......

һЩ±»ºöÊ PHP º¯Êý

תÔØ×Ô£ºhttp://www.gracecode.com/archives/3013/
×÷ÕߣºÊÖÆø²»´í
ÕæµÄÊDz»Óò»ÖªµÀ£¬ÆäʵÎÒÃÇÊìϤµÄ PHP »¹ÓкܶàºÃ¶«Î÷ûÓз¢¾ò¡£¿´µ½ÕâƪÎÄÕÂ
£¬µ±Ê±¾ÍÀá±¼Á˺ü¸»Ø£¬ÖصãÍƼöÏ£¬Ë³±ãÎÒ×Ô¼ºÒ²×ö¸öÕûÀí¡£
sys_getloadavg()
Õâ¸öº¯Êý
·µ»Øµ±Ç°ÏµÍ³µÄ¸ºÔؾùÖµÐÅÏ¢
£¨µ±È» Windows ϲ»ÊÊÓã©£¬ÏêϸÎĵµ¿ÉÒÔ·­ÔÄ PH ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ