At: PHPerKaigi 2023 ( https://phperkaigi.jp/2023/ ) Track A DateTime: 2023/3/25 10:20 (40min) Speaker: uzulla
WordPressã®ã³ã¢éçºãã¼ã ãWordPressãWebãã©ã¦ã¶ã§å®è¡ãããClient-side WebAssembly WordPressããéçºä¸ WordPressã®ã³ã¢éçºãã¼ã ã¯ãPHPãµã¼ããWebAssemblyåãããã¨ãªã©ã«ãããWordPressãWebãã©ã¦ã¶ä¸ã§å®è¡ãããClient-side WebAssembly WordPressãï¼ä»¥ä¸WASM WordPressï¼ã®éçºä¸ã§ãããã¨ãæããã«ãã¾ãããã¢ã¼ãªã¼çã®ãã¢ãå ¬éãã¦ãã¾ãã WordPressã®WebAssemblyåã¯ãå æVMwareãå®é¨çãªåãçµã¿ã¨ãã¦ãã¢ãå ¬éãã¦ãã¾ããã åèï¼PHPã¨SQLiteãWebAssemblyåããWebãã©ã¦ã¶ä¸ã§WordPressãå®è¡å¯è½ã«ãããã¢ãVMwareãå ¬é ãããä»åã¯WordPressã®ã³ã¢éçºãã¼ã èªèº«ãWebAssemb
åå¹´åãããã«ä¸ç¼ã«ã¡ã©ãè²·ã£ã¦ã«ã¡ã©æ²¼ã«ãºããºãã¨ããã£ã¦ãããã«ã§ãã æåããºã¼ã ã¬ã³ãºãè²·ã£ãã®ã§ãããåç¦ç¹ã¬ã³ãºã¨ãããã®ã«æãåºããããªã¨ãæã£ã¦ãã¾ãã ã§ãããã¾ã ä»ã®ã¬ã³ãºã®ãã¼ã³ããããããã«ã¯è²·ããªãâ¦â¦ãããªããã§ãã ãã¦ãæè¿ãGoogle Calendar APIãã¤ãã£ã¦ãèªåã®ã«ã¬ã³ãã¼ã«äºå®ã®è¿½å ã¨åé¤ãããããªãã¾ãããã¿ãªãããããããã¨ããããã¾ãããï¼ ããã§ä»åã®è¨äºã§ã¯ãGoogle Calendar APIã使ãããã«å¿ è¦ãªä¸æºåããã¦ããã¾ãã ã¡ãªã¿ã«ãããä¸æºåçµãã£ã¦ããï¼ ã¨ããæ¹ã¯ãã¡ãã®å¾ç·¨ã®è¨äºãã覧ãã ããã Google Calendar APIã®æºå Google Cloud Platform ã«ã¢ã¯ã»ã¹ãã¾ãã Google Cloud Platform: https://console.cloud.google.
2. ã¢ã¸ã§ã³ã ⢠ä¾ãã°ãPHPãé¿ãã ⢠htmlspecialchars æåã¨ã³ã³ã¼ãã£ã³ã°ãã§ãã¯ã®æ¹å ⢠register_globalsãéæ¨å¥¨ã« ⢠ãã¸ãã¯ã¯ã©ã¼ããéæ¨å¥¨ã« ⢠æå·å¦çã«å®å ¨ãªæ¬ä¼¼ä¹±æ°çæå¨ã®ãµãã¼ã ⢠ã»ãã·ã§ã³IDçæã®å®å ¨æ§å¼·å ⢠ãã«ãã¤ãæ»æã®é²å¾¡æ©è½ã®è¿½å ⢠PDOã®DBæ¥ç¶æã®æåã¨ã³ã³ã¼ãã£ã³ã°æå®ãå¯è½ã« ⢠headeré¢æ°ã®ãã°ä¿®æ£ ⢠å®å ¨ãªãã¹ã¯ã¼ãä¿åãç°¡åã«ã§ããããã«ãªã£ã Copyright © 2016 Hiroshi Tokumaru 2 3. 徳丸浩ã®èªå·±ç´¹ä» ⢠çµæ´ â 1985å¹´ 京ã»ã©æ ªå¼ä¼ç¤¾å ¥ç¤¾ â 1995å¹´ 京ã»ã©ã³ãã¥ãã±ã¼ã·ã§ã³ã·ã¹ãã æ ªå¼ä¼ç¤¾(KCCS)ã«åºåã»è»¢ç± â 2008å¹´ KCCSéè·ãHASHã³ã³ãµã«ãã£ã³ã°æ ªå¼ä¼ç¤¾è¨ç« ⢠çµé¨ããã㨠â 京ã»ã©å ¥ç¤¾å½æã¯CADãè¨
PHPã¯ããDISããããã¨ãããã¾ããããããå®éã«ã¯ã»ã¨ãã©PHPãå©ç¨ãã¦ããªã人ãå°è±¡ã ãã§DISã£ã¦ããã¨ãå¤ããããªæ°ããã¾ãã ããã§ãPHPãããDISããã¦ããç¹ã«ã¤ãã¦ãå®éã©ããªã®ããPHPæªä½é¨è åãã«è§£èª¬ãã¦ããããã¨æãã¾ããPHPã触ã£ããã¨ãªã人ã§ãããããããããã«ã·ã³ãã«ç®ãªä»æ§ã®Rubyãä¾ã«èª¬æãã¦ããããã¨æãã¾ãï¼( Ruby触ã£ããã¨ãªãã¦ãããã®ä»ã®OOPè¨èªã触ã£ããã¨ããã°é°å²æ°ã¯ç解ã§ããããã«æ¸ãã¦ãã¾ã ) DISä¾1 / PHPã¯é åæä½ããã¥ãã PHPã®é åæä½ã¯æ±ãã¥ããçã¨DISã人ãã¡ããã¾ããå®éã®ã¨ããã©ãã§ããããã 以ä¸ã®ãããªå¦çãé åã¸ã®ä¸éå¤æ°ãç¨ããè¡ãã³ã¼ããä¾ã«èãã¦ã¿ã¾ãã
PHPã«ã³ãã¡ã¬ã³ã¹é¢è¥¿2012ã§ä½¿ç¨ããã¹ã©ã¤ãã§ããå®å ¨ãªå 容ã¯ä¸åæ²¢ã§éå¬ããéã®ã¹ã©ã¤ãã¨åç»ã御覧ãã ãããRead less
è£è¶³(2010/08/24 15:00)ï¼renameé¢æ°ã«ã¤ãã¦è¨ãã°ãåä¸ãã¡ã¤ã«ã·ã¹ãã ä¸ã§ããã°renameã·ã¹ãã ã³ã¼ã«ãå©ç¨ããã®ã§ãã®åé¡ã¯èµ·ããã¾ãããããã«è足ã§ããããã¡ã¤ã«ã·ã¹ãã ãã¾ããã£ã¦renameé¢æ°ãå©ç¨ããã¨ã³ãã¼ãã¦ããåé¤ãããã¨ã«ãªããã¢ãããã¯æ§ãä¿è¨¼ã§ããªããããé害ã®åå ã«ãªããªããã©ããã®æ¤è¨ãå¿ è¦ã ã¨æãã¾ãã ãAKIBA de: PHPã®rename()é¢æ°ã¯ãã¡ã¤ã«ã·ã¹ãã éã§ä½¿ãã¨ã¡ã¢ãªããã«é£ããããã§ææããã¦ããéããPHPã®copyé¢æ°ããã¡ã¤ã«ã·ã¹ãã ãã¾ããã£ã¦renameé¢æ°ã使ãå ´åã«ãPHPããã¡ã¤ã«ãµã¤ãºã¨åã大ããã®ã¡ã¢ãªãæ¶è²»ãã¦ãã¾ãã¾ããç°å¢ã«ãã£ã¦ã¯åç¾ããªãããããã¾ããããåã®æå ã®MacOSX 10.5+PHP5.3.3ç°å¢ã§ã¯åç¾ãã¾ããã <?php // ãdd if=/dev/urando
FC2ããã°ããMT5.2.7ã«å¼ã£è¶ã ãã®ããã°ãéçºç¶ç¶ããæ°ãªãã®ã§å¼ã£è¶â¦ éææ¥èªããã°ä¸ me | ã³ã¡ã³ã(0) Vyatta 6.6R1ã§ãã£ãã¼ã¶ãã£ï½ ããã«ã¼ã¿è²·ããªãï¼â¦ éææ¥èªããã°ä¸ me | ã³ã¡ã³ã(0) PHP 5.5ã®æ°æ©è½ æè¿ãããã注è¦ãã¦ãªãã£ããã©ãã»ã³ã¹â¦ éææ¥èªããã°ä¸ me | ã³ã¡ã³ã(0)
æ°ãããã¨ãåå¼·ãã¦ãä¹ ã ã«å¿åºæåãã¾ããã Twitter ã§ããæ¹ã Fuel ã«ã¤ãã¦ã¤ã¶ããããã¦ããã®ãæè¦ãããã®æåãã¦ãã®åå¨ãç¥ãã¾ãããã PHP ã®æ°ãããã¬ã¼ã ã¯ã¼ã¯ã§ãè¤æ°ã®ãã¬ã¼ã ã¯ã¼ã¯ã®ããã¨ãããéãããã®ã¨ãããã¨ã ã£ãã®ã§ãã¡ãã£ã¨è§¦ã£ã¦ã¿ããã¨ãã¦ã³ãã¼ããã¦ããã¥ã¡ã³ããèªã¿ãªãã Hello World! ãä½ã£ã¦ã¿ããããã¨ã»ã»ã» ãã»ã»ããã¯ãããã»ã» ãªã«ããããã£ã¦ãããã¾ã§ç§ã¯ãCodeIgniterããè¶ æç¨ãã¦ãã¾ãããCodeIgniter ã¯ããã¡ãããã®ã»ã¨ãã©ããããããã®ã§ãããè¥å¹²ã ãä¸æºããã£ãã®ã§ããããããFuelPHP ã§ã¯ CodeIgniter ã®å¥½ããªã¨ããã¯ãã®ã¾ã¾ã«ãä¸æºãå ¨é¨å¹ã£é£ãã§ããã®ã§ãã ã§ã¯ããã®å ¨è²ããè¦§å ¥ãã¾ãããã [åºå] FuelPHP å ¥éæ¸ã®æ±ºå®çãçºå£²ããã¾ããã詳ããã¯ã
php -i ã¨ããã ãã§ãphpinfoã表示ãããã ãã ãããã§ã¯ãºã©ã¼ã£ã¨æµããã ãã§å ¨ãèªãäºãåºæ¥ãªãã®ã§â¦ã php -i | less ã¨ãããã php -i | grep ãã§ãã¯ãããé ç®ã®ä¸é¨ ãªã©ã¨ãã¦grepããã ä¾ãã°ãsessioné¢é£ã®å¤ã確èªãããå ´åã¯ã php -i | grep session | less ã¨ããã ãã§ãsessioné¢é£ã®æ å ±ãä¸è¦§è¡¨ç¤ºãããã â»è£è¶³ phpinfoã«ã¤ãã¦ã¯ã <?php phpinfo(); ?> ã¿ãããªãã¡ã¤ã«ãããã¥ã¡ã³ãã«ã¼ãã«è¨ç½®ããã°ãã©ã¦ã¶ããã§ã確èªåºæ¥ã¦ç¢ºãã«ä¾¿å©ã ããã©ããã®ã¾ã¾ããã£ã±ã«ãã¦ä»äººã«è¦ããããã»ã»ã»ã£ã¦ã®ã¯ãã¾ãæ°åãè¯ãç©ã§ãç¡ãã®ã§ãå©ç¨å¯è½ãªå ´åã¯ã³ãã³ãã©ã¤ã³ã§ã®ç¢ºèªã便å©ãããããªãã ã©ã£ã¡ã«ãã確èªããé ç®è¦ã¤ããããã«æ¤ç´¢ã¨ãããã¨æããã php -r
æ£è¦è¡¨ç¾ãçµãã§ãã¦ããªãã ãæãéãã®æåãããªããªã¼ã¨æã£ãæãæãåºãã¦ãã ããã ããã¥ã¢ã«:ãã¿ã¼ã³ä¿®é£¾å u (PCRE_UTF8) ãã®ä¿®æ£åã¯ãPerl éäºæ㪠PCRE ã®æ©è½ãæå¹ã«ãã¾ãããã¿ã¼ã³ æååã¯ãUTF-8 ã¨ã³ã³ã¼ããããæååã¨ãã¦å¦çããã¾ãã ãã®ä¿®æ£åã¯ãUNIX ã§ã¯ PHP 4.1.0 以éãWin32 ã§ã¯ PHP 4.2.3 以é㧠使ç¨å¯è½ã§ãã ã¾ããPHP 4.3.5 以éã§ã¯ããã¿ã¼ã³ã® UTF-8 ã¨ãã¦ã®å¦¥å½æ§ã確èªããã¾ãã UTF-8ãªæååãpregç³»ã§ä½¿ã£ã¦ããæã¯ãuãªãã·ã§ã³ãæå¹ã«ãã¾ãããï¼
大仰ãªã¿ã¤ãã«ã§ãããç´1å¹´åã®è¨äºãPHPã®sorté¢æ°ã¯ç¸å½ãããããã®è£è¶³è¨äºã§ããåãä½ãæ ¹æ ã«PHPã®sorté¢æ°ï¼ã®ç¬¬äºå¼æ°ã®ããã©ã«ãå¤ï¼ãããããã¨æã£ããã説æãã¾ããä¸è¨ã§ããã¨ãPHPã®å ¨ã¦ã®å¤ã¨SORT_REGULARï¼è¨ãæããã¨PHPã®<ã==ã>ï¼ã®çµã¿åãããå ¨é åºéåã«ãªã£ã¦ããªãããã§ãã ååã®è¨äºã®æ¦è¦ PHPã®sorté¢æ°ã¯ç¬¬äºå¼æ°ã§æ¯è¼æ¼ç®åãå¤æ´ã§ãã¾ãããçç¥ããã¨SORT_REGULARãç¨ãã¾ããããã¯PHPã®é常ã®æ¯è¼æ¼ç®åã¨åãæåã§ã両辺ã®å¤ãæ°åã£ã½ãå ´åã¯æ°å¤ã¨ãã¦ãããã§ãªããã°æååã¨ãã¦æ¯è¼ãããã®ã§ãããã®ãããªæ¯è¼ãç¨ããã¨ãã½ã¼ããä¸å¯è§£ãªæåã示ããã¨ãããã¾ãã $ php -r '$a=array("0xa","011","01a","2.0");sort($a);print_r($a);sort($a);pr
2000å¹´ããããPHP4ãJSP1.0ãåºããããPHPãããJavaãããã¨è¨ã£ã¦ãããJavaã¯åãããå®ããµã¼ãã¼ããªããã¨ãããã¨ã§ããµã¼ãã¼ã®ç¢ºä¿ã容æãªPerlãPHPã使ããã¾ããã Javaã使ãã«ã¯ãä¸å°ã¾ããã¨åãããå²é«ãªã¬ã³ã¿ã«ãµã¼ãã¼ã§ãèªåã§Tomcatãªã©ãã¤ã³ã¹ãã¼ã«ããå¿ è¦ãããã¾ããããããã£ãç¶æ³ã¯ãã°ããç¶ãããPHPãªãã°å®ãåããããµã¼ãã¼ããããããããã¨ãããã¨ãããPHPããã使ãããããã«ãªãã¾ããã PHPã®æ®ååæã§ã¯ããµã¼ãã¼ã®ç¢ºä¿ã容æãªãã¨ãPHPæ¡ç¨ã®å¤§ããªçç±ã®ã²ã¨ã¤ã ã£ãã¨æãã¾ãã ããããç¶æ³ã¯æè¿ã¾ã§ç¶ãããã©ãAmazon EC2ã®ãããã§ãJavaã¯åãããå®ããµã¼ãã¼ããªããã¨ããåé¡ã¯è§£æ±ºãã¦ãã¾ãããAmazon EC2ãåãã¦ãèªåã§Tomcatãªã©ãã¤ã³ã¹ãã¼ã«ããåé¡ãããã¾ããããHerokuãS
å人çã«ã¯ãPHP ã£ã¦ãå«ããªè¨èªãããªããã ãã©ãã¨ããå®ææ¦äºã«æã¡è¾¼ã¾ãããããæ»æããå´ã¯ããè¨èªã¨ãã¦ãªã£ã¨ãããã¿ãããªä¸»å¼µãå¤ãã¦ãå ·ä½çã«ã©ããï¼ ã¨æã£ã¦ãããã ãã©ãããã»ã©é¢ç½ãä¾ã¯ç¡ãã PHPã®æ¯è¼ã®ç´ æ´ãããå æ¸ã¯æ£å¸¸ ã16 é²æ°ã®è¡¨è¨ã¯æ´æ°ã«å¤æãããã©ãããããï¼é²æ°ã¯ãã¨ãã辺ããåä½ãªã®ã ãããã®æåãçµæ§ã奥ãæ·±ãã£ãã PHPã§ã¯"0x0A"=="10"ãtrue | æ°´ç¡æã°ããã®ãã³æ¥è¨ ä¸è¨ãã¼ã¸ãèªãã¨ãæ´æ°ã«å¤æãããã©ããã¯ãC ã®ã©ã¤ãã©ãªé¢æ°ã§ãã strtod ã«ä¾åãã¦ããããããã§ããã®ãã¼ã¸ã®ã³ã¡ã³ãã«æ¸ããã¦ããããã«ããã® strtod èªä½ããã³ã³ãã¤ã©ãã©ã®è¦æ ¼ã«æºæ ãã¦ã³ã³ãã¤ã«ãããã«ãã£ã¦ãæåãå¤ãã£ã¦ãã¾ããC99 æºæ ãã¦ã³ã³ãã¤ã«ããã°ã16 é²æ°ã®è¡¨è¨ã¯æ´æ°ã«å¤æãããããããã§ãªããã°å¤æãããªã
CakePHP 1.2RC3ãå©ç¨ãã¦ãã¾ãã ã¦ã¼ã¶ç»é²ãªã©ã§ã¢ã«ã¦ã³ãã¢ã¯ãã£ãã¼ã·ã§ã³ããéã«ãã¦ãã¼ã¯ãªIDãå«ãURLãçºè¡ãã¦ã¡ã¼ã«ã§éä¿¡ãããã®URLã«ã¢ã¯ã»ã¹ãããæ¹æ³ã¯è¯ãè¦ããã¾ãã ã¦ãã¼ã¯IDãphpã§åºåããä¸ä¾ã¨ã㦠md5(uniqid(rand(),1)); ã¨ããæ¹æ³ãªã©ã§md5é¢æ°ã®åºåçµæãç¨ããå ´åãããã¾ãï¼ä¸è¨URLåç §ï¼ http://d.hatena.ne.jp/kakku22/20081016/1224154493 CakePHPã使ã£ã¦ãã¦ãã¼ã¯ãªIDãç°¡åã«çºè¡ããæ¹æ³ã¯ãã³ã³ããã¼ã©ã§ $uuid = String::uuid(); ã¨ããã¨ã$uuidã« 494955da-0a5c-408f-ab20-0778ff2fc4a6ã¨ãããããªã¦ãã¼ã¯IDãå«ã¾ãã¾ãã ããã¯CakePHPã®cake/libs/string.phpã®uu
é£è¼ï¼ãªãPHPã¢ããªã«ã»ãã¥ãªãã£ãã¼ã«ãå¤ãã®ã?ï½gihyo.jp ⦠æè¡è©è«ç¤¾ ãªãPHPã¢ããªã«ã»ãã¥ãªãã£ãã¼ã«ãå¤ãã®ã?ç¹éãããã¤ã®ã¾ã«ãå å®ãã¦ãã¾ããã 第1åãCVEã§ã¿ãPHPã¢ããªã±ã¼ã·ã§ã³ã»ãã¥ãªã㣠第2åãCVEã§ã¿ãPHPã¢ããªã±ã¼ã·ã§ã³ã»ãã¥ãªãã£ï¼ãã®2ï¼ ç¬¬3åãWebã¢ããªã¯æ°æ¥½ãªã¢ããª?! 第4åããªãPHPæ¬ä½ã«ãã°ãå¤ãã®ã? 第5åãã¾ã ã¾ã æ®ã£ã¦ããSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ 第6åãæå¤ã«ç¥ããã¦ããªããã©ã¤ã³ãSQLã¤ã³ã¸ã§ã¯ã·ã§ã³ 第7åããã¾ãããªããã¯ãã¹ãµã¤ãã¹ã¯ãªããã£ã³ã°ã®åºç¤ã®åºç¤ 第8åãã¯ãã¹ãµã¤ãã¹ã¯ãªããã£ã³ã°å¯¾çã®è½ã¨ãç©´ 第9åãã¯ãã¹ãµã¤ãã¹ã¯ãªããã£ã³ã°ã®å称ã¨ç¨®é¡ 第10åãã¹ã¯ãªããã¤ã³ã¸ã§ã¯ã·ã§ã³ãç¡ããªããªã10ã®çç± ç¬¬11åãã¹ã¯ãªããã¤ã³ã¸ã§ã¯ã·ã§ã³ãé²ã10ã®Tips åèã«ããã¦é ãã¾ã
ããããæ¥ã¾ããããã ãPHPã¦ã©ããã第25å PHPãã¬ã¼ã ã¯ã¼ã¯ã®æ¬å½ãZend Frameworkãç»å ´ã¨ããè¨äºã«PHP6ã§gotoæãå®è£ ãããäºã«ãªã£ãããã§ãã 2005å¹´ã®6æã«PHPè¾ããããããã¾ãããã¨ããè¨äºã®ä¸ã§gotoæãå®è£ ããããè¾ããã¨å®£è¨ããã®ã§ç§ã¯PHP6ã¯è§¦ãã¾ãããPHPã¯5ã¾ã§ã§åæ¥ã¨ãããã¨ã«ãªãããã§ãã ãã§ã«Ethnaããªãã¨ã³ã¼ãæ¸ãæ°ã«ããªããªãç¶æ ãªã®ã§ãè¾ããè¯ãæ©ä¼ã«ãªã£ããªã¨ã ãã¨ããPHPã¯æ¬å®¶ã®äººéãã ãããã¾ãããregister_globalsã¨magic_quotes_gpc使ããªããããã»ã¨ãã©ã®PHPããã°ã©ã ãåããªããªãã¾ãããã絶対PHPã®äººæ°ãªããªãã¨ããããã§ãããããå æ¸ãªã¨ããPHPã®ã¡ãªããã ã£ãããã§ã竹迫ããã®YAPCã®ãã¬ã¼ã³ãããªããã©ãããããã¥ããã³ã¼ããæ¸ãã¦è·ãå®ããããªãã¬
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}