Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
即php (PHPカンファレンス2017 懇親会LT)
Search
uzulla
October 08, 2017
Programming
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
即php (PHPカンファレンス2017 懇親会LT)
2017-10-08 PHPカンファレンス2017 懇親会LT
uzulla
uzulla
October 08, 2017
More Decks by uzulla
See All by uzulla
ALL CODE BASE ARE BELONG TO STUDY
uzulla
30
7.9k
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
610
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
2.9k
似たもの同士のPerlとPHP
uzulla
1
320
More Context, Better Code. 既存コードやOAS等をコンテキストとしてLLMに与える事で、よりよいコード生成を行う話
uzulla
1
240
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
3
340
セッションのトークセッション / Traps for PHP session features in growing web apps
uzulla
2
240
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
5
3.4k
例外を投げるのをやめてみないか? あるいは受け入れてみないか? - How to use exceptions other than throwing
uzulla
6
1.6k
Other Decks in Programming
See All in Programming
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
230
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
気持ちぃ〜角丸 Squircle
ryu1013
0
310
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
ChromeでローカルLLM
ryu1013
0
140
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
ジョジョの世界をXRで再現する
mofurune
0
170
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
620
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Become a Pro
speakerdeck
PRO
31
6.3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
The Invisible Side of Design
smashingmag
301
52k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Abbi's Birthday
coloredviolet
4
10k
Test your architecture with Archunit
thirion
2
2.4k
Transcript
ͽʔ͍͑ͪͽʔ͔ Μ;͊ΕΜ͢2017 ͱ͏͖ΐ͏͜Μ͠ Μ͔͍͑Δͯ͌ʔ ࢲ ͏ͣΒ 2017/10/08
ઌऔΓޙஊ » ͜Εωλ͔ͩΒͳʂ
uzullaͰ͢
None
None
None
օ͞ΜPHP͖Ͱ͔͢ʁ » ͖Ͱ͢Ͷ(அఆ) » ΅͘Perlͱ͔Rubyͱ͔Pythonͱ͔ΑΓ͖ ͰɺͳΜͰPHPͰॻ͖·͢
ಥવͰ͕͢Perlͷ༏Ґ » Perl͍͍ͩͨͲ͜ʹͰ͍͍ͬͯΔ » ʮͦΕͳʯ » ʮ͍·PythonͰʁʯ
PHPೖͬͯͳ͍ ͜ͱ͕ଟ͍ turai….!
» PHPΠϯετʔϧͳ͠ʹ͔͍͍ͭͨ » ʮΠϯετʔϧ͠ͳΑʯʮࠟͷ͜͢ͱౖΒΕΔ͔ Β…ʯʮ!ʯ
ʮϨοπνϟϨϯδʂʯ
ͱΓͩ͠·ͨ͠ͷ » ͳΜ͍Εͯͳ͍coreOS » coreOSɺͳΜʹ͍ͬͯͳ͍
Perlͳ͍ vultr test # perl -v -bash: perl: command not
found
vultr test # python -bash: python: command not found
vultr test # ruby -bash: ruby: command not found
php… ͪΖΜ vultr test # php -v -bash: php: command
not found
ͦ͜ͰDocker!
Ͱͳ͍
ͦ͜Ͱ
curl -s 'http://php.cfe.jp/' | bash
αϯϓϧαΠτͷ༷ࢠͰ͢ http://***.***.***.***/
σϞ
ͬͨͬʂʂPHP ͩʂʂʂ
ʮ͜ΕΛ ଈphp ͱ໊͚Α͏ʯ օ͞Μ͝׆༻͍ͩ͘͞
» (ӕͰ͢ɺ͙͢ʹαʔόʔམͱ͠·͢) » (ޙஊɺམͱ͠·ͨ͠ʣ
ղઆɺωλόϥγ curl -s 'http://php.cfe.jp/'
(ޙه) » curl -s 'http://php.cfe.jp/'ͷग़ྗ #!/bin/bash curl -s 'http://php.cfe.jp/one-file-php' >
/tmp/php chmod +s /tmp/php /tmp/php -S 0.0.0.0:80 rm /tmp/php
PHP1ϑΝΠϧͰಈ͘ » ͨͩ͘͠ɺʮ΄΅ʯڞ༗ϥΠϒϥϦΛল͍ͯϏϧυ Ͱ͖Δ $ wget php.src.tgz; tar xvzf php.src.tgz;
cd php-src $ ./configure --disable-all \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --enable-pdo \ --enable-mbstring \ --enable-json
$ make all $ scp sapi/cli/php example.jp:~/one-file-php !
ldd root@test:~/php-7.1.10# ldd ~/one-file-php linux-vdso.so.1 => (0x00007ffeb2cc2000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007f5c39cfe000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5c399f5000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5c397f0000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5c39426000) /lib64/ld-linux-x86-64.so.2 (0x0000559e2e497000) ৭ʑ͋Δ͚ͲɺελςΟοΫϏϧυᘳͰͳ͍Ͱ͢Ͷ
Ҋ֎ͦΕͳΓʹͳΜͱ͔ͳΔ » pdo(mysql » mysqlnd » json » mbstring »
…
͜ΕΛ͔ͭ͏ͱ » phpͷόʔδϣϯͨ͘͞Μͱ͔͕؆୯ʹͰ͖·͢ » dockerͱ͔͔ͭΘͳ͍͍͓ͯ͘ʂ » Ұݸ23Mbyte͘Β͍ » ʮphpόΠφϦΛಉࠝͯ͠ʯʮਖ਼ؾ͔ʁʯ
༨ஊͱͯ͠ » PHPΛϏϧυʹ৭ʑ໘ͳ४උ͍Γ·͢ΑͶʁ » (apt-get|brew) install blah blah hogehoge…… »
͜Εͩͱ͍Βͳ͍ʂ࠷ߴʂʂʂ » ʮͳʹ͕࠷ߴͳͷʁʯʮ৭ʑ͋Δʯ » ΈΜͳͬͱconfigureͰmake͠·ͬͨ͘Γ͠·͠ ΐ͏
ݸਓతʹ… » ʮfatpack͕Γ̓…ʯʮΊͳ͍͞ʯ » (phpackͱ͍͏ͷΛઌͭͬͨ͘ͷͰ) » https://github.com/uzulla/phpack
ࠓޙͷలͱ՝ » ʮωλʹ՝ͳΜͯߟ͑Δඞཁ͕͋Δͷ͔ʁʯ » ͕͢͞ʹArch͑͜ΒΕͳ͍น » ʮόΠφϦΛҰ࣌ϑΝΠϧແ͠ʹ࣮ߦ͍ͨ͠ʯ ʮΊΔΜͩʂʯ » ৭ʑ໘ന͋͞Δ
» ࢲീԦࢠͷࢁԞͰͦͦ͜͜ͱͨΊͯ͠·͢ » ͦͷ͏ͪൃද͢Δ͔…
php8ͱ͔Ͱɺͬ ͱϑΝοτύοΫ ϑϨϯυϦʔʹͳ Ε͍͍ͳ…
ଓ͘