Post on 13-Apr-2017
O esquecido do PHP
http
s://w
ww.
flickr.
com
/pho
tos/g
ato-
gato
-gat
o/88
0435
6967
/
“O PHP nasceu pra web”
CLI
• Ncurses
• Readline
Zend Engine
• 59 extensões built-in disponíveis no PHP 7.0
• 63 extenções built-in disponíveis no PHP 5.6
• 351 extenções PECL
• 94 extenções PECL desde o começo de 2015
• 39 extenções PECL desde o começo de 2016
Program execution
• exec(), passthru(), shell_exec(), system()
• proc_open() e auxiliares
Forks & IPC
• PCNTL (process, forks, signals, sessions)
• sysvsem (Semaphore, Shared Memory e Message Queue)
• sysvshm (Shared Memory)
• APC
• Servidores externos (Redis, Memcache, etc…)
Threads
• Pthreads (POSIX Threads)
POSIX
• Portable Operating System Interface
• Unix API
COM
• Component Object Model
• Windows
• OLE Automation
• .Net Support
Streams
• stream_*
• Suporta file://, http://, ftp://, php://, zlib://, data://, glob://, phar ://, ssh2://, rar ://, ogg:// e expect:// pelo PHP e PECL
• streamWrapper (s3://, git://, phpx://, xuplau://)
Sockets
• socket_*
• React
• Ratchet
Reflection & Behaviour
• Reflection
• APD
• Runkit
• UOPZ
Connection handling
• connection_aborted()
• ignore_user_abort()
• connection_status()
• set_time_limit()
• register_shutdown_function()
Ticks
• declare(ticks = N)
• register_tick_function()
• unregister_tick_function()
__halt_compiler()<?php
// Abre o arquivo$file = fopen(__FILE__, 'r');
// ponteiro onde o __halt_compiler() foi executadofseek($file, __COMPILER_HALT_OFFSET__);
// Conteúdo depois do __halt_compiler()$content = stream_get_contents($file);
// Faça alguma coisa!
// the end of the script execution__halt_compiler(); binário (ZIP, TAR, PHAR) até mesmo criptografado
Arbitrary Precision
• BCMath
• GMP
Functions
• levenshtein(), metaphone(), soundex(), similar_text()
• strcasecmp(), strcmp(), substr_compare()
• sscanf()
• array_reduce()
• nl_langinfo()
SPL
• Exceptions
• Data structures
• Iterators
• File Handling
• Interfaces
Debugging & Profiling
• XDebug
• XHProf
• uprofiler
“O PHP nasceu pra ser útil”Permita-se e divirta-se!