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
300
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
アクセスキーが漏れた日にやるべきこと- 無効化の先にある本当の対応
kazzpapa3
0
320
AIエージェントのためのデータ設計
daiz21
0
220
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
dbt と Snowflake と tag
kevinrobot34
1
250
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
77k
国家プロジェクトを支える「さくらONE」 大規模LLM開発におけるGPU障害を乗り越えるクラスター運用戦略
gpuunite_official
0
280
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
460
長期運営で肥大化したExcelマスターデータの解消に向けた移行事例
gree_tech
PRO
0
510
「ミスを許さない手順書」を作ってみた 〜 個人的にはこれ以上できることはあまりなさそう/20260827-ssmjp-operation-procedure-update
opelab
1
160
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.5k
作って理解するCoding Agent 〜フレームワークに頼らないピュア Python での実装〜
takapy
4
1.3k
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
We Have a Design System, Now What?
morganepeng
55
8.3k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
41k
Embracing the Ebb and Flow
colly
88
5.1k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
67
57k
The Invisible Side of Design
smashingmag
301
52k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
440
Documentation Writing (for coders)
carmenintech
77
5.5k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
560
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
The untapped power of vector embeddings
frankvandijk
2
1.8k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
480
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 ➤ ੍ޚߏͷͻͱͭ
͋Γ͕ͱ͏ ͍͟͝·ͨ͠