You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php$gorilla = new \Animals\Gorilla;
$libs = new \Animals\StrawNeckedIbis;
if ($gorilla->isAwake() === true) {
do {
$gorilla->beatChest();
} while ($libs->isAsleep() === true);
$libs->flyAway();
}
PHP-FIG
1).即PHP Framework Interop Group。这个组织发布推荐的规范,而不是强制规范。
2).PHP-FIG的使命是实现框架的互操作性。框架的互操作性指的是通过自动加载机制、接口和标准的风格,让框架互相合作。
3).框架之间通过接口、自动加载和标准的编码风格进行合作。
PSR
1).即PHP推荐标准。这是上面的组织制定的推荐规范。例如下面的规范:
<?php ?>
或<??>
标签中。这样的话当我们使用
\Foo\Bar\Baz\Qux
这个类的时候,使用SPL注册了上面这个函数之后,PHP就会尝试从/path/to/project/src/Baz/Qux.php
加载这个类。The text was updated successfully, but these errors were encountered: