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
Modern PHP
Search
Thomas Weinert
October 29, 2014
Programming
3
210
Modern PHP
Overview of tools and language concepts
Thomas Weinert
October 29, 2014
Tweet
Share
More Decks by Thomas Weinert
See All by Thomas Weinert
Build Automation with Phive and Phing
thomasweinert
0
190
Introduction: PHP Extensions
thomasweinert
2
800
PCRE - Matching Patterns
thomasweinert
0
110
Controlling Arduino With PHP
thomasweinert
2
530
PCRE With PHP
thomasweinert
0
660
Controlling Arduino With PHP
thomasweinert
1
140
XPATH WITH PHP AND JS
thomasweinert
0
97
PHPUG CGN: Arduino With PHP
thomasweinert
0
120
IPC 2013: Controlling Arduino With PHP
thomasweinert
0
200
Other Decks in Programming
See All in Programming
Grafana Cloudとソラカメ
devoc
0
140
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
1
180
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.4k
定理証明プラットフォーム lapisla.net
abap34
1
1.8k
Domain-Driven Transformation
hschwentner
2
1.9k
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
320
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
2
310
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
190
Formの複雑さに立ち向かう
bmthd
1
810
『品質』という言葉が嫌いな理由
korimu
0
160
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.1k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
320
Raft: Consensus for Rubyists
vanstee
137
6.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Statistics for Hackers
jakevdp
797
220k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Fireside Chat
paigeccino
34
3.2k
How to Ace a Technical Interview
jacobian
276
23k
A designer walks into a library…
pauljervisheath
205
24k
Transcript
MODERN PHP TOOLS & CONCEPTS @Thomas Weinert
TOOLS
IDES Eclipse Komodo Netbeans PHPStorm ...
VCS GIT Subversion
COLLABORATION Bitbucket GitHub Sourceforge
GITLAB
COMPOSER { "name": "carica/chip", "type": "library", "license": "MIT", "require": {
"php": ">=5.4", "carica/firmata": "dev-master" }, "require-dev": { "phake/phake": "1.*" }, "autoload": { "psr-4": { "Carica\\Chip\\": "src\\" } } }
PACKAGIST
SATIS
PHAR
PHPUNIT Ide Integration Mockery Phake Prophecy
BEHAT PHPSPEC
PHING
DEBUGGER Xdebug PHPDbg
PROFILER Xdebug XHProf
CODE QUALITY
phpdepend phpmd phpcpd phploc
PHP METRICS http://halleck45.github.io/PhpMetrics/
SCRUNTINIZER CI https://scrutinizer-ci.com/
SENSIOLABSINSIHGT https://insight.sensiolabs.com
ENGINES PHP (Zend Engine) PHPNG HHVM
ZEPHYR http://zephir-lang.com namespace MyLibrary; class Filter { public function alpha(string
str) { char ch; string filtered = ""; for ch in str { if (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') { let filtered .= ch; } } return filtered; } }
ZEPHYR http://zephir-lang.com $filter = new MyLibrary\Filter(); echo $filter->alpha("01he#l.lo?/1");
PHP-CPP http://www.php-cpp.com/ Php::Value my_plus(Php::Parameters ¶meters) { return (int)parameters[0] + (int)parameters[1];
}
FEATURES
NAMESPACES PSR-4
ANONYMOUS FUNCTIONS $board ->activate() ->done( function () use ($board, $loop)
{ $pin = $board->pins[13]; $pin->mode = Firmata\Board::PIN_MODE_OUTPUT; $loop->setInterval( function () use ($pin) { $pin->digital = !$pin->digital; }, 1000 ); } );
CALLABLE $_ = FluentDOM::create(); $_->formatOutput = true; echo $_( 'ul',
['class' => 'navigation'], $_('li', $_->cdata('FluentDOM')) );
TRAITS namespace Carica\Io\Event\Loop { use Carica\Io\Event; trait Aggregation { private
$_eventLoop = NULL; public function loop(Event\Loop $loop = NULL) { if (NULL !== $loop) { $this->_eventLoop = $loop; } elseif (NULL === $this->_eventLoop) { $this->_eventLoop = Factory::get(); } return $this->_eventLoop; } } }
PASSWORD API password_hash() password_verify() password_needs_rehash() password_get_info()
OPCACHE
DATETIME / DATETIMEIMMUTABLE
EXT/INTL
MYSQLND
SYNTAX
ARRAYS function()[key] $array = [1, 2, 3]
GENERATORS function xrange($start, $limit, $step = 1) { for ($i
= $start; $i <= $limit; $i += $step) { yield $i; } }
::CLASS $object::CLASS CLASSNAME::CLASS
CONSTANT EXPRESSION const SECONDS = self::DAYS * 86400
VARIADICS function f($req, $opt = null, ...$params) { printf( '$req:
%d; $opt: %d; number of params: %d'."\n", $req, $opt, count($params) ); } f(1); f(1, 2); f(1, 2, 3);
ARGUMENT UNPACKING function add($a, $b, $c) { return $a +
$b + $c; } $operators = [2, 3]; echo add(1, ...$operators);
THANKS