17. class Base {
public static function who() {
echo __CLASS__;
}
public static function foo() {
self::who();
}
}
class Child extends Base {
public static function who() {
echo __CLASS__;
}
}
Child::foo(); // Echoes Base
Dé Luain 20 Meán Fómhair 2010
18. class Base {
public static function who() {
echo __CLASS__;
}
public static function foo() {
static::who();
}
}
class Child extends Base {
public static function who() {
echo __CLASS__;
}
}
Child::foo(); // Echoes Child
Dé Luain 20 Meán Fómhair 2010
19. $this is not static::
Don’t get tricked, no inheritance
Dé Luain 20 Meán Fómhair 2010
20. Object Lifecycle
Create, Immute, Memoize
Dé Luain 20 Meán Fómhair 2010
61. MySQLnd
Native MySQL Driver, faster, stats, self-contained
Dé Luain 20 Meán Fómhair 2010
62. DateTime
Crazy amazing dates handling
Dé Luain 20 Meán Fómhair 2010
63. $datetime1 = new DateTime('2009-10-11');
$datetime2 = new DateTime('2009-10-13');
$interval = $datetime1->diff($datetime2);
echo $interval->format('%R%d days');
// +2 days
Dé Luain 20 Meán Fómhair 2010
64. SPL
Iterators, Iterators, Iterators.
Dé Luain 20 Meán Fómhair 2010
65. SPL
Datastructures, Exceptions, Misc...
Dé Luain 20 Meán Fómhair 2010