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
310
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
310
Nuxt.js で非同期なデータを取得するときのポイント
koogawa
0
350
Vue 入門者が日報ツールを作ってみた
koogawa
1
390
地方に住むエンジニアがこの先生きのこるには
koogawa
0
1.2k
Firestore のデータ設計について
koogawa
0
860
はじめてウェブサイトで Firebase を使ってみた
koogawa
1
490
iOSアプリ開発におけるJavaScript
koogawa
1
460
Stack Overflow活動 その後の活動報告
koogawa
1
220
「まりも」と iOS の 6年間
koogawa
4
7.6k
Other Decks in Technology
See All in Technology
エージェント化するAI:現在地とその先に起きる変化 / AI as Agents: The Current State and the Changes Ahead
ks91
PRO
0
150
Digital Credentials API × OpenID4VP ブラウザ完結型本人確認の実装知見(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
330
atproto spaces概要
yamarten
0
110
マイナンバーカード本人確認の実装比較(OAuth/OIDC Numa (Immersion) Workshop 2026) / 20260825 numa-12
oidfj
PRO
0
330
500名弱規模の組織のPythonプロジェクト(dbt) をどう管理するか?
hiracky16
0
360
顧客の要望は2次情報である 〜アンテナを張るFDEの構造論〜
noriakioji
5
1k
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
460
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
110
OAuth SPIFFE Client Authentication(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
350
Claude Teamプランの コスト最適化を考える
rfdnxbro
0
800
AI時代のデータ基盤を考える問い
pacocat
0
740
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Building Adaptive Systems
keathley
44
3.2k
How to train your dragon (web standard)
notwaldorf
97
6.8k
KATA
mclloyd
PRO
35
15k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
450
The untapped power of vector embeddings
frankvandijk
2
1.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.5k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
480
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
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 ➤ ੍ޚߏͷͻͱͭ
͋Γ͕ͱ͏ ͍͟͝·ͨ͠