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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
Amazon Bedrock AgentCore 認証・認可入門
hironobuiga
2
510
AI時代、1年目エンジニアの悩み
jin4
1
160
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
420
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
140
Mosaic AI Gatewayでコーディングエージェントを配るための運用Tips / JEDAI 2026 新春 Meetup! AIコーディング特集
genda
0
150
Digitization部 紹介資料
sansan33
PRO
1
6.8k
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.2k
Meshy Proプラン課金した
henjin0
0
240
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
190
使いにくいの壁を突破する
sansantech
PRO
1
110
Context Engineeringの取り組み
nutslove
0
270
(金融庁共催)第4回金融データ活用チャレンジ勉強会資料
takumimukaiyama
0
120
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Optimizing for Happiness
mojombo
379
71k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
200
Ruling the World: When Life Gets Gamed
codingconduct
0
140
The SEO identity crisis: Don't let AI make you average
varn
0
64
Build your cross-platform service in a week with App Engine
jlugia
234
18k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
97
The untapped power of vector embeddings
frankvandijk
1
1.6k
WCS-LA-2024
lcolladotor
0
440
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
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 ➤ ੍ޚߏͷͻͱͭ
͋Γ͕ͱ͏ ͍͟͝·ͨ͠