TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP...
-
Upload
matheus-marabesi -
Category
Internet
-
view
320 -
download
0
Transcript of TDC 2016 (Florianópolis) - Vá para o próximo nível - Dicas e truques para a certificação PHP...
Globalcode – Open4education
Trilha – PHPVá para o próximo nível - Dicas e truques para a
certificação PHP
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
Bits that are set in
both $a AND $b are set.
http://php.net/manual/en/language.operators.bitwise.php
Bits that are set in
either $a OR $b are set.
http://php.net/manual/en/language.operators.bitwise.php
Bits that are set in
$a OR $b but not
BOTH are set. http://php.net/manual/en/language.operators.bitwise.php
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
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
Bits that are set in $a are not set, and vice versa.
http://php.net/manual/en/language.operators.bitwise.php
$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
);
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();
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);