SlideShare a Scribd company logo
Globalcode – Open4education
Trilha – PHP
Vá para o próximo nível - Dicas e truques para a
certificação PHP
marabesi
@MatheusMarabesi
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
ZENDSC10X
10/jun
HELP
WANTED !
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
http://phingbrasil.com.br
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
Who doesn’t
want to be
certified ?
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
????????
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
$coração = 'Hello';
echo $coração;
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
class Cächaça
{
}
$cachaça = new Cächaça();
BITWISE
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
a bitwise operation operates on one or more
bit patterns or binary numerals at the level of
their individual bits.
It is a fast, primitive action directly supported
by the processor, and is used to manipulate
values for comparisons and calculations
& AND
| OR
^ XOR
>> RIGHT
<< LEFT
Bits that are set in
both $a AND $b
are set.
http://php.net/manual/en/language.operators.bitwise.php
& - AND
0 & 0 = 0
0 & 1 = 0
1 & 0 = 0
1 & 1 = 1
print (4 & 8);
Bits that are set in
either $a OR $b
are set.
http://php.net/manual/en/language.operators.bitwise.php
| - OR
0 | 0 = 0
0 | 1 = 1
1 | 0 = 1
1 | 1 = 1
print (2 | 7);
Bits that are set in
$a OR $b but not
BOTH are set.
http://php.net/manual/en/language.operators.bitwise.php
| - XOR
0 ^ 0 = 0
0 ^ 1 = 1
1 ^ 0 = 1
1 ^ 1 = 0
print (3 ^ 9);
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1 255
128 64 32 16 8 4 2 1
0 0 0 0 0 1 0 0 4
0 0 0 0 1 0 0 0 8
print (4 & 8);
& - AND
128 64 32 16 8 4 2 1
0 0 0 0 0 0 1 0 2
0 0 0 0 0 1 1 1 7
print (2 | 7);
| - OR
128 64 32 16 8 4 2 1
0 0 0 0 0 0 1 1 3
0 0 0 0 1 0 0 1 9
print (3 ^ 9);
^ - XOR
& AND
| OR
^ XOR
>> RIGHT
<< LEFT
Shift the bits of $a
$b steps to the right
(each step means
"divide by two")
http://php.net/manual/en/language.operators.bitwise.php
bit leftmost / 2 ^ bit rightmost
>> - Shift right
print (4 >> 6);
4 / 2 ^ 6 = 0
Shift the bits of $a $b
steps to the left (each
step means "multiply
by two")
http://php.net/manual/en/language.operators.bitwise.php
bit leftmost * 2 ^ bit rightmost
<< - Shift left
print (7 << 9);
7 * 2 ^ 9 = 3584
& AND
| OR
^ XOR
>> RIGHT
<< LEFT
Bits that are set in
$a are not set, and
vice versa.
http://php.net/manual/en/language.operators.bitwise.php
~ - Not
~x = -x -1
print (~9);
~9 = -9 -1 = -10
exit(253);
php execute.php
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
http://www.phpinternalsbook.com/
STREAMS
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
$context = stream_context_create([
'http' => [
'method' => 'GET'
]
]);
print file_get_contents(
'http://api.phpconference.com.br',
false,
$context
);
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => 'field=value'
]
]);
print file_get_contents(
'http://api.tdc2016floripa.com.br',
false,
$context
);
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
O.O.PObject . Oriented . Programming
LATE STATIC BINDING
X
SELF
class A {
public static function who() {
echo __CLASS__;
}
public static function test() {
self::who();
}
}
class B extends A {
public static function who() {
echo __CLASS__;
}
}
B::test();
class A {
public static function who() {
echo __CLASS__;
}
public static function test() {
static::who();
}
}
class B extends A {
public static function who() {
echo __CLASS__;
}
}
B::test();
OBJECT CLONING
class A {
public $name;
}
$a = new A();
$b = clone $a;
var_dump($a == $b);
class A {
public $name;
}
$a = new A();
$a->name = 'Ana';
$b = clone $a;
$b->name = 'Clark';
var_dump($a == $b);
class B {
public $lastName;
}
class A {
public $name;
public $lastName;
public function __construct()
{
$this->lastName = new B();
}
}
$a = new A();
$a->lastName->lastName = 'River';
$b = clone $a;
$b->lastName->lastName = 'Dom';
var_dump($a == $b);
ARRAY
sort();
rsort();
asort();
ksort();
krsort();
usort();
A
K
U
R
ASSOCIATIVE
KEY
USER
REVERSE
sort();
rsort();
asort();
ksort();
krsort();
usort();
array_diff_ukey
array_diff_uassoc
array_​intersect_​assoc
array_​intersect_​uassoc
array_​intersect_​ukey
DON’T
FORGET !
TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)
marabesi
@MatheusMarabesi

More Related Content

PDF
Laravel the right way
PDF
Laravel, the right way - PHPConference 2016
PDF
TDC2015 Porto Alegre - Automate everything with Phing !
PDF
Todos os passos para a certificação PHP - PHPExperience2017
PDF
PHP and Rich Internet Applications
PDF
Build your own RESTful API with Laravel
PDF
Laravel - PHP For artisans
PDF
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
Laravel the right way
Laravel, the right way - PHPConference 2016
TDC2015 Porto Alegre - Automate everything with Phing !
Todos os passos para a certificação PHP - PHPExperience2017
PHP and Rich Internet Applications
Build your own RESTful API with Laravel
Laravel - PHP For artisans
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -

What's hot (18)

PDF
Twib in Yokoahma.pm 2010/3/5
PDF
Generating Power with Yield
PDF
Blog Hacks 2011
PDF
WordPress: From Antispambot to Zeroize
DOCX
Sadi service
DOCX
Example code for the SADI BMI Calculator Web Service
PDF
YAPC::Asia 2010 Twitter解析サービス
PDF
PHP and Rich Internet Applications
PDF
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
PDF
Mojolicious
PPTX
4. Php MongoDB view_data
PPTX
16.mysql stored procedures in laravel
PDF
Codeigniter : Custom Routing - Manipulate Uri
PPTX
21.search in laravel
PDF
Getting out of Callback Hell in PHP
Twib in Yokoahma.pm 2010/3/5
Generating Power with Yield
Blog Hacks 2011
WordPress: From Antispambot to Zeroize
Sadi service
Example code for the SADI BMI Calculator Web Service
YAPC::Asia 2010 Twitter解析サービス
PHP and Rich Internet Applications
JAVASCRIPT NÃO-OBSTRUTIVO com jQuery
Mojolicious
4. Php MongoDB view_data
16.mysql stored procedures in laravel
Codeigniter : Custom Routing - Manipulate Uri
21.search in laravel
Getting out of Callback Hell in PHP
Ad

Viewers also liked (12)

PDF
ZCPE - PHP Conference 2015
PDF
scdevsumit 2016 - Become a jedi with php streams
PDF
TDC 2015 - Wearables no IoT (PT-BR)
PDF
Web Sockets - HTML5
PDF
TDC São Paulo 2016 - Become a jedi with php streams
PDF
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
PDF
GDG Passo fundo - Apps with unit tests (Karma + jasmine + angular)
PDF
From legacy code to continuous integration
PDF
Phing - PHP Conference 2015
PDF
IoT powered by PHP and streams - PHPExperience2017
PDF
Introduction to TDD (PHPunit examples)
PDF
Control your house with the elePHPant - PHPConf2016
ZCPE - PHP Conference 2015
scdevsumit 2016 - Become a jedi with php streams
TDC 2015 - Wearables no IoT (PT-BR)
Web Sockets - HTML5
TDC São Paulo 2016 - Become a jedi with php streams
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
GDG Passo fundo - Apps with unit tests (Karma + jasmine + angular)
From legacy code to continuous integration
Phing - PHP Conference 2015
IoT powered by PHP and streams - PHPExperience2017
Introduction to TDD (PHPunit examples)
Control your house with the elePHPant - PHPConf2016
Ad

Similar to TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR) (20)

PPTX
Phpbase
PPTX
php programming.pptx
PDF
What's new with PHP7
DOCX
PHP record- with all programs and output
PDF
Exakat for PHP : smart code reviewing engine
PPTX
C#7, 7.1, 7.2, 7.3 e C# 8
PDF
Introduction to PHP
PDF
Ruby on Rails For Java Programmers
PDF
Zend Certification PHP 5 Sample Questions
PDF
Profiling php5 to php7
KEY
Workshop quality assurance for php projects tek12
PDF
What To Expect From PHP7
PPT
PHP and MySQL
PPT
PPTX
Php 7 hhvm and co
PPT
Web Technology_10.ppt
PPT
php 1
PPT
PHP Scripting
PPT
Basic PHP
Phpbase
php programming.pptx
What's new with PHP7
PHP record- with all programs and output
Exakat for PHP : smart code reviewing engine
C#7, 7.1, 7.2, 7.3 e C# 8
Introduction to PHP
Ruby on Rails For Java Programmers
Zend Certification PHP 5 Sample Questions
Profiling php5 to php7
Workshop quality assurance for php projects tek12
What To Expect From PHP7
PHP and MySQL
Php 7 hhvm and co
Web Technology_10.ppt
php 1
PHP Scripting
Basic PHP

More from Matheus Marabesi (10)

PDF
IoT Project postmortem
PDF
Testing with Laravel - 7Masters 2018 (Laravel)
PDF
Laravel collections an overview - Laravel SP
PDF
Becoming an author - Sharing knowledge
PDF
Docker 101 - Getting started
PDF
Introduction to IoT and PHP - Nerdzão day #1
PDF
7masters - MongoDb
PDF
CK 10 - Automate all the things 2.0
PPTX
Arduino day 2015 - UFABC (PT-BR)
PPT
7º Connecting Knowledge (PT-BR)
IoT Project postmortem
Testing with Laravel - 7Masters 2018 (Laravel)
Laravel collections an overview - Laravel SP
Becoming an author - Sharing knowledge
Docker 101 - Getting started
Introduction to IoT and PHP - Nerdzão day #1
7masters - MongoDb
CK 10 - Automate all the things 2.0
Arduino day 2015 - UFABC (PT-BR)
7º Connecting Knowledge (PT-BR)

Recently uploaded (20)

PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
PPTX
Layers_of_the_Earth_Grade7.pptx class by
PDF
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PPT
250152213-Excitation-SystemWERRT (1).ppt
PPTX
SAP Ariba Sourcing PPT for learning material
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
DOC
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
PPTX
t_and_OpenAI_Combined_two_pressentations
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
Funds Management Learning Material for Beg
PPTX
E -tech empowerment technologies PowerPoint
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PDF
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
simpleintnettestmetiaerl for the simple testint
PDF
Introduction to the IoT system, how the IoT system works
SASE Traffic Flow - ZTNA Connector-1.pdf
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
Layers_of_the_Earth_Grade7.pptx class by
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
Exploring VPS Hosting Trends for SMBs in 2025
250152213-Excitation-SystemWERRT (1).ppt
SAP Ariba Sourcing PPT for learning material
Uptota Investor Deck - Where Africa Meets Blockchain
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
Power Point - Lesson 3_2.pptx grad school presentation
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
t_and_OpenAI_Combined_two_pressentations
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Funds Management Learning Material for Beg
E -tech empowerment technologies PowerPoint
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
Mathew Digital SEO Checklist Guidlines 2025
simpleintnettestmetiaerl for the simple testint
Introduction to the IoT system, how the IoT system works

TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP (PT-BR)