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
0
280
PHP or die
Webナイト宮崎 Vol.12 ~てげPHP学びたい~ - connpass
https://tegehoge.connpass.com/event/199828/
Kosuke Ogawa
January 22, 2021
Tweet
Share
More Decks by Kosuke Ogawa
See All by Kosuke Ogawa
TypeScript リテラル型について
koogawa
1
270
Nuxt.js で非同期なデータを取得するときのポイント
koogawa
0
320
Vue 入門者が日報ツールを作ってみた
koogawa
1
370
地方に住むエンジニアがこの先生きのこるには
koogawa
0
1.2k
Firestore のデータ設計について
koogawa
0
800
はじめてウェブサイトで Firebase を使ってみた
koogawa
1
460
iOSアプリ開発におけるJavaScript
koogawa
1
440
Stack Overflow活動 その後の活動報告
koogawa
1
210
「まりも」と iOS の 6年間
koogawa
4
7.4k
Other Decks in Technology
See All in Technology
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
300
2人で作ったAIダッシュボードが、開発組織の次の一手を照らした話― Cursor × SpecKit × 可視化の実践 ― Qiita AI Summit
noalisaai
1
320
最速で価値を出すための プロダクトエンジニアのツッコミ術
kaacun
1
480
JuliaTokaiとしてはこれが最後かもしれない(仮) for NGK2026S
antimon2
0
130
エンジニアとマネジメントの距離/Engineering and Management
ikuodanaka
3
700
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
1.3k
Azure SQL Databaseでベクター検索を活用しよう
nakasho
0
130
Digitization部 紹介資料
sansan33
PRO
1
6.7k
Meshy Proプラン課金した
henjin0
0
170
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
110
メルカリのAI活用を支えるAIセキュリティ
s3h
8
5.8k
MySQLのJSON機能の活用術
ikomachi226
0
130
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
240
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
130
Ruling the World: When Life Gets Gamed
codingconduct
0
130
Are puppies a ranking factor?
jonoalderson
1
2.7k
Utilizing Notion as your number one productivity tool
mfonobong
2
210
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
54
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
270
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
150
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
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 ➤ ੍ޚߏͷͻͱͭ
͋Γ͕ͱ͏ ͍͟͝·ͨ͠