2017.07.15 HANATANI Takuma a.k.a. potato4d #phpkansai
PHPã«ã³ãã¡ã¬ã³ã¹é¢è¥¿2015ã«è¡ã£ã¦ãã¾ããã ä»åããå ´æãå¤ãã£ãããåã®ææåã ã£ããã¨ã¹ã¿ããã®çããã¯è²ã ã¨å¤§å¤ã ã£ããã¨æãã¾ããæ¬å½ã«ãããã¨ããããã¾ããã ä»åã¯ã»ãã·ã§ã³ã®ãã©ãã¯ã5æ¬ã§ãå 容çã«ãåå¿è ç¨ããæ¿ããã®ã¾ã§å å®ãã¦ãããé常ã«æºè¶³ã§ãã¾ããã è¦ãããªãã£ããã©æ°ã«ãªãã»ãã·ã§ã³ãæ°å¤ãããã¾ããã®ã§ããããã§å ¬éããã¦ããã»ãã·ã§ã³ã®ã¹ã©ã¤ããã¾ã¨ãã¦ã¿ã¾ããã ã¨ããããè¦ã¤ãããããã®ãæ²è¼ããã¦é ãã¦ããã¾ãããããããã¢ããããããã®çããããã¨æãã¾ãã®ã§ãã¾ãè¦ã¤ã次第æ´æ°ããã¦é ãã¾ãã ã»ãã·ã§ã³ã®ã¹ã©ã¤ã åºèª¿è¬æ¼ãPHPï¼ã§å¤ããã㨠è¨èªä»æ§ã¨ã¨ã³ã¸ã³ã®æ¹åãã¤ã³ãã PHP7ã§å¤ããã㨠ââè¨èªä»æ§ã¨ã¨ã³ã¸ã³ã®æ¹åãã¤ã³ã from Yoshio Hanawa www.slideshare.net ãããã°ã¦ã§ã¼ãå°æ¥ï¼
æ®æ®µ Scala ã§ãã¬ã¤ãã使ãã¾ãã£ã¦ãããã©ã PHP ã«ã 5.4 ãããã¬ã¤ããå ¥ã£ãã trait ã®è¯ãã¨ããã¯å¤éç¶æ¿ã®ã§ããªãè¨èªã§å¤éç¶æ¿ã£ã½ããã¨ãã§ãããã¨ã ã use, use ã¨ã¤ãã¦ããã°ããããã§ã追å ã§ãããDRY ã«æ¸ãã¦ãããã¨ã ã 対ãã¦æªãã¨ããã¯ãã¨ãç°¡åã«è¤éã§æé»çãªä¾åé¢ä¿ãçã¾ãããã¨ã ã ä¾ãã°ãããªã® <?php trait Greeting { public function say() { if ($this->location == 'ja') { echo 'ããã«ã¡ã¯' . PHP_EOL; } else { echo 'Hello' . PHP_EOL; } } } class Location { } class US extends Location { use Greeting; private $location
2013-10-17 yumã§php5.5ãã¤ã³ã¹ãã¼ã«ããæ¹æ³ WEB æè¡ PHP ã¿ã¼ããã« Apache 2013-10-17 php5.5ãã¤ã³ã¹ãã¼ã«ãã¦Apacheã®ã¢ã¸ã¥ã¼ã«ã¨ãã¦ä½¿ãããã£ãã®ã§ã¡ã¢yumã®ããã©ã«ãã®ãªãã¸ããªããã ã¨ï¼php5.3ããã¤ã³ã¹ãã¼ã«ã§ããªãããã§ï¼ãªãã¸ããªã追å ããCentOS5ã ã¨ï¼ rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm CentOS6ã ã¨ï¼ rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm ãªãã¸ããªã追å ããããç¢ºèª rpm -qa | grep webtatic æåãã¦ããã°ï¼ webtatic-release-6-4.noarch ã¨ã§ãï¼æ¬¡ã«ï¼ä»å ¥ã£ã¦ããphpé¢é£ã®ã¢ã¸ã¥ã¼ã«ãæ¶ã yum
PHP is a web-focussed programming language, so processing user data is a frequent activity. In such processing it is common to check for something's existence, and if it doesn't exist, use a default value. Yet the simplest way to do this, something along the lines of isset($_GET['mykey']) ? $_GET['mykey'] : "", is unnecessarily cumbersome. The short ternary operator, ?: provides a way to do this m
Home > Advent Calendar 2013 | AWS | PHP | éçºç°å¢ > CentOS 5, 6 / Amazon Linux 㧠PHP ãããã±ã¼ã¸ã¤ã³ã¹ãã¼ã«ããæ¹æ³ã¾ã¨ã Shin x blog Advent Calendar 2013 ã® 15 æ¥ç®ã§ãã Cent OS 5, 6 / Amazon Linux ã«ã¦ãPHP ã®åãã¼ã¸ã§ã³ã yum ã§ã¤ã³ã¹ãã¼ã«ããæ¹æ³ãã¾ã¨ãã¦ã¿ã¾ããã CentOS 6 CentOS 5 Amazon Linux CentOS 6 PHP 5.3 CentOS 6 ã§ã¯ãå ¬å¼ããã±ã¼ã¸ã PHP 5.3.3 ãªã®ã§ãå ¬å¼ã®ãªãã¸ããªããã¤ã³ã¹ãã¼ã«ã§ãã¾ãã $ sudo yum -y install php (snip) $ php -v PHP 5.3.3 (cli) (built: Dec 11 2013 0
â»ãã®å®è£ ã¯ãã°ãããã¾ããã³ã¡ã³ãããã³æ£ããå®è£ ãåç §ãã¦ãã ããã ãå©ç¨ã§ãããã£ã«ã¿ã®ãªã¹ããã¨ããè¬ã®é ç®ãããã¾ãã filter_input()ã¨ãã®Filterã¨ã¯ã¾ãå¥ã®ãPHPã«ããã©ã«ãã§ç¨æããã¦ãããã£ã«ã¿ã§ãã ä½ãã§ãããã¨ããã¨ãå ¥åºåã¹ããªã¼ã ã«å¯¾ãã¦æä½ãå¯è½ã§ãã ã¹ããªã¼ã ã¨ã¯fopen()ã¨ãã§ãªã¼ãã³ããããªã½ã¼ã¹ã§ãã¨ãããä»ã«ä½ã使ãããã®ãããã§ãããï¼ <?php $text = 'abcdefg'; // ã¹ããªã¼ã ãã£ã«ã¿ $crypt = 'mcrypt.'.MCRYPT_3DES; $decrypt = 'mdecrypt.'.MCRYPT_3DES; $params = array('iv'=>'hoge', 'key'=>'fuga'); // æ¸ã込㿠$fp = fopen('foo.txt', 'w'); // æå·å
@syossan27 ãããããã¨ããã³ã¨ãã¾ããããå¦çãçµãã£ããããä¸ã¤ã®ã¢ã¯ã·ã§ã³ã«ãªãã¤ã¬ã¯ããã¦ã¿ã¦ã¯ãããã§ããããï¼â MATSUO Masaru (@localdisk) 2014, 5æ 12 ãã¾ã¼ã«ããããªãã¨ããããã¨ãããã¾ãããã§ãã¾ããªãã¤ã¬ã¯ãããã°ããããã¿ãããªåçãããã§ãããããèãããæ®éã«ã§ããããªã¼ã¨ã ã¾ããå¼ã³åºããã CalledController. <?php class CalledController extends \BaseController { protected $user; public function __construct(User $user) { $this->user = $user; } public function getUser() { return $this->user; } } ãã® get
PHPã¨Composerã§å æ¥composer/composerã®dev-masterã«ä¾åããããã°ã©ã ãä½ã£ã¦ããããcomposer installã®ã¨ãã«ä»¥ä¸ã®ãããªã¨ã©ã¼ãã§ã¦ã¤ã³ã¹ãã¼ã«ã§ããªãåé¡ã«ã¶ã¡ãããã¾ããã Your requirements could not be resolved to an installable set of packages. Problem 1 - kohkimakimoto/altax v3.0.6 requires composer/composer dev-master -> no matching package found. ... 解決æ¹æ³ã¯composer.jsonã«"minimum-stability": "dev"ã¨"prefer-stable": trueãæå®ãããã対象ã®ããã±ã¼ã¸ã«"composer/compo
PHP ã¨ããã°å°è±¡çãªã®ã¯ãæ´å²çãªçç±ã (âé»æ´å²) ã®æ°ã ã§ããã ãã®ã»ãã·ã§ã³ã§ã¯ãæ®æ®µéã«ããã£ã¦ãã¦ã¹ãããã®å½ãããã¨ã®å°ãªããæ´å²çãªçç±ããã¡ãå¼ãããåºããå¾¹åºè¿½åããé ãæ±ãã¦ãããã¨æãã¾ããRead less
PHPã¯5.3ããåå空éãå°å ¥ãããååã®è¡çªãé¿ããããé·ãã¯ã©ã¹åãã¤ãããã¨ãã解æ¾ããã¾ãããããããªãããåå空éã使ã£ãã³ã¼ãã¯ãåå空éã使ã£ã¦ããªããã®ã«æ¯ã¹ã¦æ¬å½ã«èªã¿ããããªã£ã¦ããã®ã§ããããï¼ ããã§ä¾ãæãã¾ããPHPã®è¯è³ªãªã½ã¼ã¹ã³ã¼ãã¨è¨ãã°ãç§ã¯Zend Framework(ZF)ãSymfonyãæãæµ®ãã¹ãã®ã§ãããZFã®ã¨ããã¯ã©ã¹ã®åé ãè¦ã¦ã¿ã¾ãããã https://github.com/zendframework/zf2/blob/master/library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php <?php /** * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframewo
by @dekokun on 2013/12/15 20:47 Tagged as: Ruby. ã©ããããã¼ãã§ã¯ãRuby Advent Calendar 2013ã®15æ¥ç®ã®è¨äºã§ãã æ¨æ¥ã¯@Shindo200ã®-> { âPerfect Ruby Advent Calendarâ }.callã§ãããã æ¨æ¥ã¯PHPã®ã¢ããã³ãã«ã¬ã³ãã¼ãæ¸ããä»æ¥ã¯Rubyç³»ã®ã¢ããã³ãã«ã¬ã³ãã¼ãæ¸ããå æãªãã®ã§ããã ç§ã¨ãã¼ãã§ã¯ãRubyã®å ç¸ ããããã¨ä¸ç·ã«åã³ã³ãã身ã¨ãã¦ã¯ããã¼ãã§ã¯ãRubyã¯è²·ããªãã¦ã¯ãããªããªã¨æã£ã¦ããããã§ãããã¾ã è²·ã£ã¦ãªããã©ã â ã§ããã (@dekokun) 2013, 8æ 30 ä¸è¨ã®ãããªãã¤ã¼ãããã¦ãããªãããã£ã¨ãã¼ãã§ã¯ãRubyãè²·ã£ã¦ãªãã£ãã®ã§ããããã¼ãã§ã¯ãRubyã¢ããã³ãã«ã¬ã³ãã¼ãåå¨ããã¨èãã¦è²·ã£ã¦ã¿ã
ãã¨ã®å§ã¾ã PHP ã® srand é¢æ°ã«ã¤ãã¦èª¿ã¹ã¦ãã¦ãã²ãããªæåã«srandã®seedã«æååï¼numericã§ããå¿ è¦ã¯ãããã©ï¼ã渡ãããã¨ãç¥ã£ãã ã§ã¯ãããã« long ãè¶ ãããã®ãæ¾ãè¾¼ãã¨ã©ããªãã®ãã ã§ã¯çµæãããããã ããã ãï¼ï¼ï¼ï¼ã ãªããããªãã®ã ç§å¯ã¯ PHP å¦ç系㮠zend_parse_arg_impl é¢æ°ã«ããã¾ãã zend_parse_arg_impl ã¯phpã®é¢æ°ã«æ¸¡ãããå¼æ°ããã¼ã¹ããé¨åã§ãlongãè¦æ±ããé¢æ°ã«stringãªå¤ã渡ãããæã®å¦çã¯ãã®é¨åã§ããã https://github.com/php/php-src/blob/master/Zend/zend_API.c#L335 ãã¦ãèªã¿é²ãã¦ããã¨ããï¼ï¼ï¼ï¼ãã£ã¦ãªãè¡ãããã¯ãã§ãã ãã®è¡ã§ãã https://github.com/php/php-
Shin x blog Advent Calendar 2013 ã®ï¼æ¥ç®ã§ãã 6åã§åããã¹ãæè¿ã®PHPäºæ ããããã£ã¨ãç´¹ä»ãã¾ãã éå»ã®ã¨ã³ããªã¯ãã¡ãã 6åã§ãããæè¿ã®PHP â 2012å¤ 5åã§ãããæè¿ã®PHP â 2011å¤ 1. PHP 5.5 ãªãªã¼ã¹ PHP5ç³»ã®æ°ãããã¼ã¸ã§ã³ã¨ãã¦ãPHP 5.5 ã 2013å¹´6 æã«ãªãªã¼ã¹ããã¾ããã æ°ããæ©è½ã¨ãã¦ã¯ãã¸ã§ãã¬ã¼ã¿ã finally å¥ã®ããã¹ã¯ã¼ãããã·ã¥é¢æ°ãOPCache ãªã©ã追å ããã¦ãã¾ãã 2013/12/04 ç¾å¨ã§ã¯ã5.5.6 ãææ°çã¨ãªã£ã¦ãã¾ãã PHP5.5 ã®ã³ã¼ããã£ãã·ã¥ã¯ APC ãã Zend OPcache 㸠PHP: PHP 5.4.x ãã PHP 5.5.x ã¸ã®ç§»è¡ â Manual PHP 5.5ã®æ°æ©è½ï¼ãã£ããç解ããPHP 5.5ã®è¨èªä»
(Last Updated On: 2018å¹´8æ13æ¥)å æ¥ã10年以ä¸åéãããã¦ãããã¨ãPHPã®éçºè MLã§è°è«ãã¦çºè¦ããã®ã§ããã®å¤§æ¥ãæ«é²ãã¾ãã PHPã®æ¯è¼ã¨BOOL/NULLåã®è©±ã§ãã ãã¨ã®çºç«¯ã¯miné¢æ°ã§ var_dump(min(-100,-10, FALSE( or NULL), 10, 100); ã¨ããã¨FALSEï¼ã¾ãã¯NULLï¼ãè¿ã£ã¦ãããã¨ãããã°ã¬ãã¼ãããã§ããã PHPã®BOOL/NULLå㯠var_dump(TRUE == 1); var_dump(FALSE == 0); var_dump(NULL == 0); ã¯ããããTRUEãè¿ãã¾ããTUREã¯1ãFALSE/NULLã¯0ã¨è©ä¾¡ããã¦ãã¾ãã ç®è¡æ¼ç®ã®å ´åãBOOL/NULLåã¯æ°å¤ã¨ãã¦è©ä¾¡ããã¾ãã var_dump(TRUE + 1); // 2 var_dump(F
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}