Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PHP or die
Search
Kosuke Ogawa
January 22, 2021
Technology
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHP or die
Webナイト宮崎 Vol.12 ~てげPHP学びたい~ - connpass
https://tegehoge.connpass.com/event/199828/
Kosuke Ogawa
January 22, 2021
More Decks by Kosuke Ogawa
See All by Kosuke Ogawa
TypeScript リテラル型について
koogawa
1
300
Nuxt.js で非同期なデータを取得するときのポイント
koogawa
0
350
Vue 入門者が日報ツールを作ってみた
koogawa
1
380
地方に住むエンジニアがこの先生きのこるには
koogawa
0
1.2k
Firestore のデータ設計について
koogawa
0
840
はじめてウェブサイトで Firebase を使ってみた
koogawa
1
480
iOSアプリ開発におけるJavaScript
koogawa
1
460
Stack Overflow活動 その後の活動報告
koogawa
1
210
「まりも」と iOS の 6年間
koogawa
4
7.5k
Other Decks in Technology
See All in Technology
白金鉱業Meetup_Vol.24_「AIエージェントは分けるほど良い」は本当か? / Is it true that “the more you divide AI agents, the better”?
brainpadpr
1
300
Claude Codeをどのように キャッチアップしているか
oikon48
6
3.9k
On-behalf-of Token exchange with AgentCore Identity
hironobuiga
2
150
新しいVibe Codingと”自走”について
watany
5
290
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
600
連合学習と機密コンピューティング
lycorptech_jp
PRO
0
100
Bucharest Tech Week 2026 - Reinventing testing practices in the AI era
edeandrea
PRO
1
140
Claude Code の Sandbox 機能を Anthropic Sandbox Runtime(srt) で試そう!/lets-play-anthropic-sandbox-runtime
tomoki10
1
540
AGENTS.mdとSkillsで始めるAIエージェント活用
sonoda_mj
3
200
脆弱性対応、どこで線を引くか
rymiyamoto
0
360
爆速でマルチプロダクトを立ち上げる時 事業・CTO目線で大事にしたい事
miyatakoji
0
100
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
1k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
ラッコキーワード サービス紹介資料
rakko
1
3.6M
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
Music & Morning Musume
bryan
47
7.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
PHP OR DIE WebφΠτٶ࡚ Vol.12
ࣗݾհ ➤0HBXB,PTVLFʢ!LPPHBXBʣ ➤Ξϧגࣜձࣾ ➤ٶ࡚͔Β౦ژʹϑϧϦϞʔτ ➤J04 4XJGU "OESPJE ,PUMJO 5ZQF4DSJQU
$44 7VFKT /VYUKTͳͲ ➤ݸਓ։ൃͰ1)1ʢࣝ7FSY Ͱࢭ·ͬͯΔʣ
Α͘ݟΔʁίʔυ
ಉ͡ϊϦͰ͜͏͔ͨͬͨ͠ PHP Parse error: syntax error, unexpected 'return'
https://stackoverflow.com/questions/14393173/in-php-why-does-or-die-work-but-or-return-doesnt
ͭ·Γɺreturn ʮࣜʯͰͳ͍
“ࣜɺPHP ʹ͓͚Δ࠷ॏཁͳϏϧσΟϯάϒ ϩοΫͰ͢ɻPHPʹ͓͍ͯɺ΄ͱΜͲશͯͷ ͷࣜͰهड़͞Ε·͢ɻ ࠷؆୯Ͱ࠷ਖ਼֬ͳ ࣜͷఆٛɺ"͕͋Δͷશͯ"Ͱ͢ɻ ࣜͱ - PHPϚχϡΞϧ
ࣜͷྫ ➤$a = 5 ➤5 5 ͱ͍͏Λ༗͢Δʮࣜʯ ➤$b =
$a ➤$a 5 ͱ͍͏Λ࣋ͭʮࣜʯ ➤$c = foo(); ➤foo() ԿΒ͔ͷΛฦ͢ʮࣜʯ
࠷ॳͷྫΛࢥ͍ग़ͯ͠ΈΔ ➤ $fp = false or die(“hoge”); ΤϥʔʹͳΒͳ͍ ➤ $fp
= false or return 0; PHP Parse error: syntax error, unexpected ‘return' $fp = ࣜ1 or ࣜ2
݁ɿΑͬͯɺ࣍ͷίʔυΤϥʔʹͳΔ PHP Parse error: syntax error, unexpected 'return'
RETURN ➤ ੍ޚߏͷͻͱͭ
͋Γ͕ͱ͏ ͍͟͝·ͨ͠