php
PHPã®ããã¥ã¢ã«ãè¦ã¦ãã¦æ°ä»ããã¨ã£ã¦æ¡å¤å¤ããä»æ¥ã¯Exceptionã®é ãè¦ã¦ãã¦ãã³ã³ã¹ãã©ã¯ã¿ã®ç¬¬3å¼æ°ã«PHP 5.3.0ããå¥ã®ä¾å¤ã渡ããã¨ãã§ããããã«ãªã£ãã®ãç¥ã£ãã getMessage(), $e->getCode(), $e); } ã¤ã¾ãããããããµãã«ä¾å¤ã®ã©ããâ¦
èªå® ã®MacãSnow Leopardã«ããããã¡ã°ãã³ã£ãããããã¨: icecube:~ hiro_y$ php -v PHP 5.3.0 (cli) (built: Jul 19 2009 00:34:29) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend TechnologiesPHP 5.3.0ãâ¦
PHPã®ãªã¼ããã¼ãã£ã³ã°ã§1ã¤æ°ã«ãªããã¨ããã£ãã®ã§å®é¨ã/test.php
ããããPHP 5.3.0ã®ç°å¢ãWindowsä¸ã«ä½ã£ã¦ã¿ããã ãã©ãç¡åé¢æ°ã¯PHP 5.3.0ãã追å ãããClosureã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã«ãªãã¿ããã C:\>php -v PHP 5.3.0 (cli) (built: Jun 29 2009 21:25:23) Copyright (c) 1997-2009 The PHP Group Zend Engine vâ¦
ã¢ãã¾ã³APIã使ãã®ã«2009å¹´8æ15æ¥ããèªè¨¼ãå¿ è¦ã«ãªãããã Amazonã®APIã使ãå ´åã«èªè¨¼ã³ã¼ããå¿ è¦ã«ãªã件ã ãã©ãHMACSHA256ã ããPHPã ã¨ããã ãã
PHPã®ãªãã¬ã¯ã·ã§ã³ã£ã¦ä½¿ããã¦ãã®ããªãPHPã®ããã¥ã¢ã«ã§ããããã¥ããå ´æã«è§£èª¬ããã£ã¦ã決ãã¦éè¦è¦ããã¦ãæããããªããã¡ãªã¿ã«ãkarintoã§ã¯ã¡ã½ããã®å¼æ°ã®åæ°ã«å¿ãã¦karinto_sessionã®ã¤ã³ã¹ã¿ã³ã¹ãçæãããã©ãããå¤æãã¦ããç®â¦
PHPã®ã¿ã¤ããã³ãã£ã³ã°ã£ã¦ã©ãã¾ã§ãã¡ãã¨æ¸ããã®ãªã®ã ãããåå空éããªãã¨ããå¶ç´ããã«ãã©ããã¦ãé·ããªã£ã¦ãã¾ããã¡ãªPHPã®ã¯ã©ã¹åãã¡ã½ããã®å¼æ°ã§ãã¡ãã¨ã¿ã¤ããã³ãã£ã³ã°ãè¨è¿°ããã°ãã®ãããé·ãè¨è¿°ã«ãªã£ã¦ãã¾ãããã¯ã©ã¹â¦
Googleã®Picasaã§ã¤ããã¿ã°ã¨ã説ææã¯ãIPTCã®å½¢å¼ã§ç»åã«ä¿åãããããããIPTCã£ã¦ãªãã ãã¨èª¿ã¹ã¦ããããEXIFã¨åããããªç»åã«ä»å ã§ããã¡ã¿ãã¼ã¿ã§ãPHPã«ã¯iptcparseã¨ãiptcembedã¨ããé¢æ°ãåå¨ãããã¨ãåãã¦ç¥ã£ãï¼ãã®è¾ºã詳ããï¼â¦
èªåã§ä½¿ããªãããã¨ãããã¨ããããkarintoã®sessionã¯ã©ã¹ããã£ã±ãå»æ¢ãããã¨ãèãããããã£ã±ãå»æ¢ãã¦ãã¾ãããããã¾ãããPHPã§ã»ãã·ã§ã³ãæ±ãå ´åãmemcacheã¨ãDBã«ãã¼ã¿ãä¹ããã±ã¼ã¹ãã»ã¨ãã©ã§ãå®éåé¡åç´ãªsessioné¢æ°ã®ã©ãâ¦
moonyã§ã¯æå³çã«ãã¸ãã¯ã¡ã½ãã使ããªãããã«ãã¦ããã ãã©ãkarintoã§ã¯ããããã¸ãã¯ã¡ã½ãããããã°ãããã¨ãæãã¯ããã¦ãï¼__setã¨ã__getã¨ã__issetã¨ã__unsetã¨ãï¼ã session(true); $session->name = $req->namâ¦
å ¥åãã©ã¡ã¼ã¿ã®ã¨ã³ã³ã¼ãã£ã³ã°ãä¸æ£ãªå ´åã®HTTPã®ã¹ãã¼ã¿ã¹ã³ã¼ã
ç´ æ´ãªçåãmb_check_encodingé¢æ°ã§å ¥åãã©ã¡ã¼ã¿ã®ã¨ã³ã³ã¼ãã£ã³ã°ããã§ãã¯ãã¦ã¨ã©ã¼ã ã£ãå ´åãwebã¢ããªã¯HTTPã®ã¹ãã¼ã¿ã¹ã³ã¼ãã¨ãã¦ä½ãè¿ãã°ããã®ã ããã 200: ã¨ã©ã¼ã¡ãã»ã¼ã¸è¡¨ç¤º 403: ã¢ã¯ã»ã¹ç¦æ¢ 406: åãä»ããããªã 追è¨: ããâ¦
PHPã§ä¾å¤ã使ãã¨ãã«æ°ãã¤ãã¦ãããã¨ãããã¯ã§ããã ãæ示çã«throwãã¦ããããã¨ã ãçºçãããä¾å¤ãcatchãããä½ãããªããã°ããä¸ä½ã®å¼ã³åºãå ã«throwããã¦ãããããããã¦ãã¾ãã¨PHPã®å ´åã¡ã½ããã«Javaã®ãããªthrowså¥ããªãã®ã§ããâ¦
PHPã¯GETã¨ãPOSTã®ãªã¯ã¨ã¹ããã©ã¡ã¼ã¿ãã¹ã¼ãã¼ã°ãã¼ãã«å¤æ°ï¼ãããååã ï¼ã§ç°¡åã«åãåãããã便å©ãªã®ã ããã©ããã®å¤ãé常ã®æååãªã®ãé åãªã®ãã¯èª¿ã¹ã¦ã¿ãªãã¨ããããªãã /foo.php?name=bar /foo.php?name[]=bar /foo.php?name=bar â¦
ãã¼ããªããã header("HTTP/1.0 404"); ã ãã§ã404 Not Foundãã®æååãè¿ã£ã¦ããã¿ããã§ããâ¦â¦ãããPHPã 2008-12-14 - kotori@notes HTTPã®ã¹ãã¼ã¿ã¹ã³ã¼ãã¨PHPã®é¢ä¿ã«ã¤ãã¦id:takahashimããã«ã³ã¡ã³ãæ¬ã§æãã¦ããã£ãã®ã§è©¦ãã¦ã¿ã¾ããâ¦
PHPã¯webã«ç¹åããè¨èªãªãã ããããã£ã¨ç°¡åã«HTTPã®ã¹ãã¼ã¿ã¹ã³ã¼ããéåºããããã ãã®é¢æ°ã¨ããç¨æããã¦ãã¦ãããã¨æãã send_http_status_code(404);ã¿ãããªæãã§ãPEAR::HTTP_Headerã¨ããã®ããã ãã«ä½¿ãã®ãä½ãéãæ°ãããã
ãã¬ã¼ã ã¯ã¼ã¯ã£ã¦ãããããããã©ããã®ã½ã¼ã¹ãèªã¿ãããã追ããããã¨ããã®ã¯ãã¯ãéè¦ãªã®ã ã¨æãããã®ãã¬ã¼ã ã¯ã¼ã¯ãå©ç¨ãã¦ããã¨ã©ããã¦ãã½ã¼ã¹ãèªã¾ãªããã°ãªããªãã·ã¼ã³ã¨ããã®ã¯åºã¦ããã¨æãããããããæå³ã§Zend Frameworkâ¦
PHPã®ãªãã¬ã¯ã·ã§ã³ã§å®è£ ããã¦ããgetDocCommentã¡ã½ããã試ãã¦ã¿ããPHP 5.1.0以éã®ç°å¢ã§å©ç¨ã§ããã¯ãã bar; } } $refClass = new Reflectioâ¦
ããªãããï¼ã§ç®¡çãã¦ããµã¼ãã¼ã®1ã¤ãPHP5対å¿ãããããªã®ã§phpinfo()ã®åºåçµæãªã©è¦ã¦ãããæ°ã«ãªã£ã¦ããPDOã®å¯¾å¿ã¯ã sqlite2 sqlite mysql pgsql ã«ãªã£ã¦ããsqliteé¢æ°ã®æ¹ã¯sqlite2ã¾ã§å¯¾å¿ã ã£ãã®ã§ãsqlite3ã使ããããã«ãªã£ãã£ã¦ãã¨â¦
id:devworksãããããããï¼ãã¨Twitterã§è¨ã£ã¦ããã®ã§NetBeans 6.5RC2ã®PHPãã³ãã«çãã試ãä¸ãSubversionã¨ã®é£æºå«ãã¦é常ã«ä¾¿å©ãããå人çãªéçºç°å¢ã¯ããNetBeansã§ããæããã¾ã ã¹ãããå®è¡ã¨ãã¯è©¦ãã¦ãªããã©ããã®ãã¡è©¦ããããNetBeâ¦
ããid:clonedã«è©¦ããã¦ããï¼2008-11-12ï¼ãã¾ãããmoonyãPHP5çã«trunkã®å·®ãæ¿ãããã¾ããããããã«PHP4ã¯ããããããªãã¨ããæãã§ãhttp://code.google.com/p/moony/ã¾ã ãã¹ãã¨ããã¥ã¼ãã³ã°ã¨ãå ¨ç¶ãªã®ã§ããããããã©ãã·ã¥ã¢ããããæâ¦
Moonyã®PHP5対å¿çãä½ã£ã¦ã¾ãããå®æããã¤ã«ãªããããããªããã©ãSubversionã§php5ã£ã¦ãã©ã³ããåã£ããã®ã®ãã¨ããããæå ã§ãã«ããã«ãæ¸ãã¦ã¾ããphp5-testflightçã¨ãã¦ãæåã¯ã¡ããã¡ããæ¸ãç´ãã°PHP5ã«å¯¾å¿ï¼ã¨æã£ãã®ã ãã©ãããâ¦
PHPã«ã³ãã¡ã¬ã³ã¹2008ã«åå ããã®ã§ãä»ãããªããã¡ã¢ã®å 容ããããã¦ãããå²ã¨å人ç¨ã PHP 5.3 ã©ã ãé¢æ°ã¨ã¯ãã¼ã¸ã£ late static binding dynamic static call phar mysqlnd namespace IDEã§èªåè£å®ã¨ãã»ãããªããããªäºæ PEAR::PHP_CodeSniffâ¦
CakePHP 1.2ã®validationè¨æ³ãèªãã§ãããã¬ã¼ã ã¯ã¼ã¯ã«ãã£ã¦ãããããªvalidationè¨æ³ããããã©ãçµå±ã®ã¨ãããvalidationã®ã«ã¼ã«ãXMLã§è¨è¿°ããããYAMLã§è¨è¿°ããããé£æ³é åã§è¨è¿°ãããã®éãã§ãããªãã®ããã
é åã®å¤æ°ãããå ´åã«ããã®é åã®è¦ç´ æ°ã0ã§ãªããã¨ã確èªããã®ã«emptyã使ãã®ã«æµæããããemptyã®æ±ãç¯å²ãåºãããããããªã 0) { // ... } ä¸ã®æ¸ãæ¹ã®æ¹ã好ã¿ãemptyã£ã¦é¢æ°ãããªãã¦è¨èªæ§é ã ã£ããããããã ããã©ãã
åããæã£ã¦ããã ãã©ãSmartyã®assignã¡ã½ãããé¢åããããåç´ã«æ¸ãã®ã«é·ãããã $smarty->assign('foo', $bar); assignã¯ãå²ãå½ã¦ããã£ã¦æå³ã ãããããã«ãã®éããªãã ãã©ãã§ããã£ã±ãassignã¯é·ãã¨æãï¼ã¼ãããã®ãããªã ããªã®ã ãâ¦
viewãã«ãã¼ã®å®è£ ãé¢æ°ãã¼ã¹ã«ããããªãã¸ã§ã¯ããã¼ã¹ã«ãããè¿·ããé¢æ°ã§ããããªã¼ãã¨æã£ãããªãã¸ã§ã¯ãã«ãã¦ãããæ¹ãå®è£ ã¨ãã¡ã³ããã³ã¹æ¥½ããã¨æã£ãããã©ã£ã¡ããããããã inputText('name'); ?> PHPã®å ´åãå²ã¨é¢æ°ãã¼ã¹ã§ããâ¦
Macä¸ã§PHPããããå ´å: ãã¡ã¤ã«æä½ã¯ã¿ã¼ããã«ã§ Subversionã®æä½å«ã *.phpãã¡ã¤ã«ç·¨éã¯CotEditor㧠è¡ãå ´åãå¤ããã¡ãã£ã¨ç´ãã ããªãvimã§ãã£ã¦ãã¾ããã©ããããªãã¨ãã¿ã¼ããã«ãããã¡ã¤ã«ãCotEditorã§éããã¨ä¾¿å©ã ã http://www.evâ¦
CakePHPã¯Viewããå²ã¨ãããããªæ å ±ã«ã¢ã¯ã»ã¹ã§ããã ããããã°ãViewã«ã¤ãã¦ã¯ãã¾ãèªããã¦ããªã: CakePHP ã®ããããé£ã¹æ¹ Viewã¨ããããã³ãã¬ã¼ãããã¢ã¯ã·ã§ã³ã®å¤æ°ã«ã¢ã¯ã»ã¹ã§ãããããã®å¿ è¦ããªããããã°ä¾¿å©ãªã®ã¯ããã£ã¦ããã ãâ¦
Moony::importãããªãã¦Moony::loadã«ããã
ãã¬ã¼ã ã¯ã¼ã¯ä½ã£ã¦ãã¨ããã¥ã¼ã®ãã«ãã¼ã¯ã©ã¹ãä½ãã«ããã£ã¦ Moony_Helper Moony_View_Helper ã®ã©ã¡ãã®ã¯ã©ã¹åããããå²ã¨ã©ãã§ããããã¨ã§ããããèãããããããã³ãã¬ã¼ãããã©ãå¼ã³åºãã®ãã¨ããå ¨é¨1ã¤ã®ã¯ã©ã¹ã§å®è£ ããã®ãã©ããâ¦