Autoloaders remove the complexity of including files by mapping namespaces to file system paths.
<?php
use Vendor\Package\ClassName;
$object = new ClassName();
Interfaces simplify the sharing of code between projects by following expected contracts.
<?php
namespace Psr\Log;
/**
* Describes a logger instance
*/
interface LoggerInterface
{
Interoperable standards and interfaces to have an agnostic approach to handling HTTP requests and responses, both on client and server side.
<?php
namespace Psr\Http\Message;
/**
* Representation of an outgoing, client-side request.
*/
interface RequestInterface extends MessageInterface
{
Standardized formatting reduces the cognitive friction when reading code from other authors.
<?php
namespace Vendor\Package;
class ClassName
{
public function fooBarBaz($arg1, &$arg2, $arg3 = [])
{
// method body
}
}