PHPããã°ã©ãã³ã°ã®éã«ã³ã¼ãããããã°ããã®ã«æãæ軽ãªã®ã¯ãvar_dumpããã¬ã¼ã§å¤æ°ã®ä¸èº«ãè¦ãæ¹æ³ã ã¨æããä¾ãã°ä½ããããããªåããããã¡ã½ããããã£ãæã«ããã®ä¸ã®ã³ã¼ãã«var_dumpãå·®ãè¾¼ãã§ã³ãã³ãã©ã¤ã³ã§å®è¡ãããããã¦æ¬æ¥ã¨ãã¹ãå¤ããå¤ãã¦ããå¤æ°ãå¤ãè¦ã¤ãããã¨ã§ããã°ã®åå ãè¦ã¤ããã®ã«æç¨ãªæ å ±ãå¾ããã¨ãã§ããã ãã®ããæ¹ã¯ç°¡åã ãåé¡ããããããããªåããããã¡ã½ããã®ä¸ã«ãvar_dump($a);ã¨ããã³ã¼ããæ¿å ¥ãã¦ãã³ãã³ãã©ã¤ã³ã§å®è¡ãã¦ã$aã¨ããå¤æ°ã®ä¸èº«ã確èªãããããç¹ã«ä½ãããããªã¨ããããªããã³ã¼ããæ¸ãæãã¦æ¬¡ã¯$bã¨ããå¤æ°ã®ä¸èº«ãè¦ããåé¡ã¯ãªãã次ã«ã³ã¼ããæ¸ãæãã¦$cã¨ããå¤æ°ã®ä¸èº«ãâ¦ã¨ãã風ã«ãããããªå¤ããªããªãè¦ã¤ãããªãæã« var_dumpçã®ã³ã¼ããæ¿å ¥ãã ã³ãã³ãã©ã¤ã³ã§å®è¡ãã 表示ããã
PHP ã§ã¯ä»¥ä¸ã®ããã« new ãã¦ããã¡ã½ãããå¼ã¹ãªã <?php new DateTime()->getOffset(); ãªã®ã§ãå¼æ°ããã®ã¾ã¾è¿ãé¢æ°ãä½ã£ã¦ãã㨠<?php function expr($a) { return $a; } expr(new DateTime())->getOffset(); // OK! 便å©ã ãªã¼ ãã¾ã é åã¢ã¯ã»ã¹ç¨ã®ãä½ã£ã¦ããã¨ä¾¿å© <?php function expr($a) { return $a; } function idx($array, $i) { return $array[$i]; } echo idx(idx(expr(new DateTimeZone('Asia/Tokyo'))->getTransitions(), 0), 'abbr') . "\n"; ãã¾ã2 ç¡åé¢æ°ããã®ã¾ã¾å¼ã¶ã¨ãã«ã使ããã <
PHPã§ã¯ä»ã®è¨èªã®ããã«ã³ã³ã¹ãã©ã¯ã¿ããã¡ã½ãããã§ã¼ã³ã§ããªããä¾ãã°"new Hoge->doSomething();"ã¨ãããããªãã¨ãã§ããªã(ãã£ã¦ã¿ãã¨ãã¼ãµã¨ã©ã¼ã«ãªã)ã ãªãã¸ã§ã¯ããçæãã¦ä½ãã²ã¨ã¤ã¡ã½ãããå¼ã³åºãã¦çµãããã¨ããä¾ã®æã« <?php $obj = new Hoge; $obj->doSomething(); ã¨ããã®ã¯å¤æ°ã«ä½ãååãã¤ããã³ã¹ããã¿ã¤ãæ°ãªã©ã®è¦³ç¹ããè¦ã¦ããã©ããããã ããã§ä»¥ä¸ã®ãããªé¢æ°ãå®ç¾©ããã <?php function ref($obj) { return $obj; } ãã®é¢æ°ã¯ã¿ãã¨ãã渡ãããå¤ããã®ã¾ã¾è¿ãé¢æ°ã ããããã使ããã¨ã§ä»¥ä¸ã®ããã«ã¡ã½ãããã§ã¼ã³ã§ããããã«ãªãã <?php ref(new Hoge)->doSomething(); ã¨ããããããã¦ãã¦ã£ã½ã話ã
ã³ã¡ã³ãã¨æ´æ°å±¥æ´ã¯ã¼ãã¨ç¡éã®éã®ã㰠» Todo.phpã¸ã©ããã ï¼MOONGIFT風ã«ï¼ã¿ãªããã¯ã¿ã¹ã¯ç®¡çã«ã©ããªãã®ã使ã£ã¦ããã ããããWebã®ãµã¼ãã¹ã§ãã¤ã³ã¹ãã¼ã«åã®ãã¼ã«ã§ããTODO管çã®æ¹æ³ã¯è²ã ããããããæ¢ãã¦ã¿ãã¨æå¤ã«å¸¯ã«çã襷ã«é·ãã§ããã Remember The Milkã¯é«æ©è½ã ãéãããTracã¯å ±æããã«ã¯è¯ããå人ã§ä½¿ãã«ã¯åé·ãiGoogleã®TODOã¬ã¸ã§ããã¯ã·ã³ãã«ã§ãããçãã¨ããã«æãå±ããªãã ãããªããã£ããèªåã®ãµã¼ãã§æ軽ã«ç®¡çã§ããTODOãã¼ã«ã¯ã©ãã ããããä»æ¥ç´¹ä»ããã®ã¯PHPã1ãã¡ã¤ã«ã®ã¿ããããDBãä¸è¦ãªTODO管çãã¼ã«ããTodo.phpãã ã ä¸è¨ã®ã½ã¼ã¹ã³ã¼ããã³ãã¼ãã¦é©å½ãªååã§PHPãã¡ã¤ã«ã¨ãã¦ä¿åããTodoã¯ã©ã¹ã®å é ã§å®ç¾©ãã¦ããå®æ°ï¼constï¼ãã好ã¿ã§å¤æ´ãã¦ãã ãããã¾ããå®
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}