This document contains information about PHP including links to Matheus Marabesi's GitHub and Twitter profiles, job opportunities, PHP user groups in Brazil, PHP certification, PHP classes and operators like bitwise operators and object cloning, and PHP functions for sorting arrays and comparing arrays. It also briefly covers object-oriented programming concepts in PHP like late static binding and streams.
24. 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
54. 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();
55. 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();
57. class A {
public $name;
}
$a = new A();
$b = clone $a;
var_dump($a == $b);
58. class A {
public $name;
}
$a = new A();
$a->name = 'Ana';
$b = clone $a;
$b->name = 'Clark';
var_dump($a == $b);
59. 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);