8. NAMESPACE
namespace blueplanet;
class Animal {
public function saveTheWorld($when) {
}
}
$animal = new blueplanetAnimal();
$animal->saveTheWorld('now');
// or
use blueplanet as caprica;
$animal = new capricaAnimal();
$animal->saveTheWorld('now');
9. Why ?
namespace foo::bar;
function baz(){ echo "func";}
namespace foo;
class bar {
public static function baz() {
echo "method";
}
}
foo::bar::baz();
18. Intl - Classes
Locale : Identifier for a language, culture or regional
specific
Collator : string comparison locale-sensitive
NumberFormatter : format numbers, currencies and
percentages in locale-sensitive
IntDateFormatter : format date locale-sensitive
MessageFormatter : format string with time, date,
number or choice input
19. Phar
PHP Archive
Similar to Jar concept from Java
Allow the possibility to put an entire applications in one
file.
Extensions not required to execute the file
Facilitate the distribution
Can improve performance with a byte code cache system