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
An Introduction to PHP ... And Why It's Yucky!
Search
Jorge Silva
November 13, 2014
Technology
1
190
An Introduction to PHP ... And Why It's Yucky!
A short introduction to some of the good parts and bad parts of PHP. Mostly the bad parts.
Jorge Silva
November 13, 2014
Tweet
Share
More Decks by Jorge Silva
See All by Jorge Silva
Introduction to RethinkDB : Move fast and break things
thejsj
2
250
ForwardJS - RethinkDB - Getting Started
thejsj
0
180
ForwardJS - RethinkDB - Advanced Queries
thejsj
1
180
Automatic Failover in RethinkDB
thejsj
0
220
Workshop: Introduction to RethinkDB : Santa Cruz JS
thejsj
1
110
Push databases: A better way to build realtime apps
thejsj
0
120
Data Modeling in RethinkDB
thejsj
4
260
RethinkDB+Angular.js: Building realtime web applications
thejsj
10
30k
Introduction to RethinkDB: 1KE Meetup
thejsj
0
40
Other Decks in Technology
See All in Technology
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
530
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
870
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
680
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
390
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Typedesign – Prime Four
hannesfritz
40
2.4k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
A Philosophy of Restraint
colly
203
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
890
Bash Introduction
62gerente
608
210k
Building an army of robots
kneath
302
43k
The Language of Interfaces
destraynor
154
24k
Designing the Hi-DPI Web
ddemaree
280
34k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Transcript
<?php ?> echo `An introduction to PHP`;
<?php ?> echo `An introduction to PHP`; echo `7 reasons
why it’s yucky`;
<?php ?> echo `First, the good parts`; var_dump([ `Web’s most
popular server lang`, `Incredibly easy to deploy`, `WordPress, uber popular framework`, `Templating is built-in` ]);
<?php ?> echo `Problem #1`; echo `Templating is built-in`; foreach($arr
as $el) { echo `<p>`; echo doSomeMysteriousThing($el); echo `</p>`; }
<?php ?> echo `Problem #2`; echo `It can be very
inconsistent`; echo 'hello \nworld'; // hello \nworld echo "hello \nworld"; // hello // world
<?php ?> echo `Problem #3`; echo `Everything is a function!!!`;
array_push($arr, `abc`); // 5.3 array_key_exists($arr, `abc`); // bool $r = array_merge($arr, [`abc`]); $r = array_map(`func`, $arr); $r = count($arr);
<?php ?> echo `Problem #4`; echo `Equality is unequal`; `6`
== ` 6` // true `133` == `0133` && 133 != 0133; // true `foo` == 0 && `foo` == true; // true NULL < -1 && NULL == 0; // true
<?php ?> echo `Problem #5`; echo `Scope is weird...`; if
(1 === 1) { $v = `if`; } function a() { $v = `a`; } function b() { global $v; $v = `b`; } a(); echo $v; // `if` b(); echo $v; // `b`
<?php ?> echo `Problem #6`; echo `Debugging is terrible!`; echo
$arr; // `Array` print_r($arr); // Array ( [0] => 1 [1] var_dump($arr); // array(4) { [0]=> int( var_dump(debug_backtrace());
<?php ?> echo `Problem #7`; echo `Documentation is terrible`; echo
($documentation == $forum); // 1
<?php ?> echo `In the end...`;
<?php ?> echo `In the end...`; echo `...it doesn’t matter
that much`; $u = `http://blog.codinghorror.com/`; $u .= `php-sucks-but-it-doesnt-matter`; echo $u;