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
{
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
}
}