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
170
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
170
ForwardJS - RethinkDB - Advanced Queries
thejsj
1
180
Automatic Failover in RethinkDB
thejsj
0
210
Workshop: Introduction to RethinkDB : Santa Cruz JS
thejsj
1
100
Push databases: A better way to build realtime apps
thejsj
1
110
Data Modeling in RethinkDB
thejsj
4
250
RethinkDB+Angular.js: Building realtime web applications
thejsj
10
30k
Introduction to RethinkDB: 1KE Meetup
thejsj
0
38
Other Decks in Technology
See All in Technology
VS CodeでAWSを操作しよう
smt7174
8
1.7k
Azure犬駆動開発の記録/GlobalAzureFukuoka2024_20240420
nina01
1
220
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
260
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
380
開発生産性大幅アップ!Postman VS Code拡張機能
nagix
2
450
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
850
.NET Profiler in 2024.
kkamegawa
1
120
TechFeed Experts Night#27 〜 フロントエンドフレームワーク最前線 (Svelte)
baseballyama
1
540
require(ESM)とECMAScript仕様
uhyo
3
830
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
190
障害対応をちょっとずつよくしていくための 演習の作りかた
heleeen
0
300
アクセス制御にまつわる改善 / Improving access control
itkq
0
560
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Gamification - CAS2011
davidbonilla
76
4.6k
Why Our Code Smells
bkeepers
PRO
331
56k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
Raft: Consensus for Rubyists
vanstee
132
6.3k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Designing for Performance
lara
601
67k
Product Roadmaps are Hard
iamctodd
44
9.7k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Code Reviewing Like a Champion
maltzj
514
39k
It's Worth the Effort
3n
180
27k
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;