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
160
Introduction: PHP Extensions
thomasweinert
2
760
PCRE - Matching Patterns
thomasweinert
0
100
Controlling Arduino With PHP
thomasweinert
2
500
PCRE With PHP
thomasweinert
0
600
Controlling Arduino With PHP
thomasweinert
1
130
XPATH WITH PHP AND JS
thomasweinert
0
87
PHPUG CGN: Arduino With PHP
thomasweinert
0
110
IPC 2013: Controlling Arduino With PHP
thomasweinert
0
190
Other Decks in Programming
See All in Programming
個人開発で使ってるやつを紹介する回
yohfee
1
670
Assembling the Future: crafting the missing pieces of the Ruby on Wasm puzzle
skryukov
0
130
自分だけの世界を創るクリエイティブコーディング / Creative Coding: Creating Your Own World
chobishiba
2
460
sqlcを利用してsqlに型付けを
kamiyam
0
230
タイミーにおけるデータの利用シーンと データ基盤の挑戦
marufeuille
4
3.1k
M5Stack に色々な M5ユニットをつないで扱う為の新たなアプローチ
gob
0
200
データサイエンスのフルサイクル開発を実現する機械学習パイプライン
xcnkx
2
480
.NET Aspireのクラウド対応検証: Azureと他環境での実践
ymd65536
1
280
Kubernetes上でOracle_Databaseの運用を楽にするOraOperatorの紹介
nnaka2992
0
150
dbt-ga4パッケージを実業務に導入してみた話
t_tokumaru_feedcorp
0
120
いまあるチームにフィットさせる Serverless そして Platform Engineeringへの挑戦 / Serverless Fits the Team You Have and Platform Engineering
seike460
PRO
2
1.4k
型付きで行うVSCode拡張機能開発 / VSCode Meetup #31
mazrean
0
230
Featured
See All Featured
Designing with Data
zakiwarfel
98
5.1k
The Cost Of JavaScript in 2023
addyosmani
43
5.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
Into the Great Unknown - MozCon
thekraken
30
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Building Better People: How to give real-time feedback that sticks.
wjessup
360
19k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
In The Pink: A Labor of Love
frogandcode
139
22k
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