Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
元Javaエンジニアが怖いと思うPHPの仕様
Search
sorch
November 19, 2019
Programming
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
元Javaエンジニアが怖いと思うPHPの仕様
Java経験者がPHPを学習して「この仕様、まじか(ヒヤリハットッ)」と感じた言語仕様をクイズ形式で紹介
sorch
November 19, 2019
More Decks by sorch
See All by sorch
他言語と比較して今こそ理解しよう! 目指せ、列挙型マスター!
soachr
0
290
アカウント発行システムをDDDでリファクタリングしたら 幸せになりそうな予感がした
soachr
1
310
おさらい!PHP8で廃止される機能
soachr
1
690
Other Decks in Programming
See All in Programming
Event is what happens
moro
2
770
The Rails Doctrine Decade
koic
2
590
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
180
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
Domain-Driven Transformation
hschwentner
2
2.3k
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
300
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
Featured
See All Featured
Mind Mapping
helmedeiros
1
400
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Side Projects
sachag
456
43k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
It's Worth the Effort
3n
188
29k
WENDY [Excerpt]
tessaabrams
14
40k
WCS-LA-2024
lcolladotor
0
890
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Transcript
元 J A V A エ ン ジ ニ ア
が 怖 い と 思 う P H P の 仕 様 ~ ~ L E T ’ S Q U I Z ! ! ~ ~
この発表について • Java経験者がPHPを学習して「この仕様、まじか(ヒヤリハットッ)」と 感じた言語仕様をクイズ形式で紹介 • 主な対象者 – 非スクリプト言語経験者でPHP学び始めの人
そーく soachr 新卒入社 4年目 開発エンジニア • 今までの経歴 – • 開発・運用保守(3.5年間)
/ Java, PostgreSQL, js, jQueryなど – • 開発(半年) / PHP, PostgresSQL, js, jQueryなど 自己紹介
LET’S QUIZ!!
PHP QUIZ!! (1/3) Question 以下のコードの結果は? $hoge = 0; if ($hoge
= 12) { print $hoge; }
PHP QUIZ!! (1/3) Question 以下のコードの結果は? $hoge = 0; If ($hoge
= 12) { print $hoge; } Answer 12 PHPの仕様 条件式の評価結果が - 0であればFALSE - 0以外であればTRUE
PHP QUIZ!! (2/3) Question 以下のコードの結果は? $str = ‘’; If ($str)
{ print ‘hello!!PHP’; }
PHP QUIZ!! (2/3) Question 以下のコードの結果は? $str = ‘’; If ($str)
{ print ‘hello!!PHP’; } Answer なにも出力されない。 エラーにもならない。 PHPの仕様 条件式の評価結果が - 空orNULLであればFALSE - 空orNULL以外であればTRUE
PHP QUIZ!! (3/3) Question 以下のコードの結果は? function argumentOne($msg) { print "
argumentOne : {$msg}"; } argumentOne(‘msg’, ‘hoge’);
PHP QUIZ!! (3/3) Question 以下のコードの結果は? function argumentOne($msg) { print "
argumentOne : {$msg}"; } argumentOne(‘msg’, ‘hoge’); Answer エラーなし。 ・(余談)第2引数に指定した’hoge’という文字列は以下の関 数で取得できる $msg2 = func_get_arg(1); //$msg2 = ’hoge’ ・PHPはオーバーロード機能がないため、 実現するには↑のfunc_get_arg()を駆使するとかになる …(探したらライブラリがありそうだが)
まとめ •PHPはJavaよりゆるふわ!!! – 条件式を書くときはPHP本家サイトを必ず確認す ること –Javaとは勝手が違うという認識を持つこと
ご 清 聴 あ り が と う ご ざ
い ま し た