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
Transcript
37 slides
ͽʔ͍͑ͪͽʔ͔ Μ;͊ΕΜ͢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ͱ͔Ͱɺͬ ͱϑΝοτύοΫ ϑϨϯυϦʔʹͳ Ε͍͍ͳ…
ଓ͘
More Decks by uzulla
See All by uzulla
ALL CODE BASE ARE BELONG TO STUDY
uzulla
30
7.9k
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
640
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
3k
似たもの同士のPerlとPHP
uzulla
1
330
More Context, Better Code. 既存コードやOAS等をコンテキストとしてLLMに与える事で、よりよいコード生成を行う話
uzulla
1
260
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
3
350
セッションのトークセッション / Traps for PHP session features in growing web apps
uzulla
2
250
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
5
3.5k
例外を投げるのをやめてみないか? あるいは受け入れてみないか? - How to use exceptions other than throwing
uzulla
6
1.6k
Other Decks in Programming
See All in Programming
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
140
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
410
Crash Auto Pipelines
veronikapj
1
460
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
320
初学者向け 分散トレーシングとDatadog
mtaka1222
0
120
LambdaなのにVM?Lambda MicroVMsを調べてみた / About Lambda Micro VMs
ak2ie
2
110
あなたはMCPの機能を、まだ知らない。
4geru
1
760
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1.1k
Promiseの向こう側へコンテキストを届ける ― proposal-async-context
seriseri
1
1.1k
Debian JP Projectのサーバー構成
uwabami
1
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
120
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
300
Paper Plane
katiecoart
PRO
6
55k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Raft: Consensus for Rubyists
vanstee
143
7.9k
Mobile First: as difficult as doing things right
swwweet
225
10k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
700
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
500
30 Presentation Tips
portentint
PRO
1
480
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
410