Skip to content

Instantly share code, notes, and snippets.

@lloc
Last active March 23, 2018 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloc/fede88d2bc9a80311541b86d58f7601c to your computer and use it in GitHub Desktop.
Save lloc/fede88d2bc9a80311541b86d58f7601c to your computer and use it in GitHub Desktop.
<?php
require_once 'namespace-class.php';
// Namespace: Using
echo ( new \wctrn\realloc\Post() )->get_content(), PHP_EOL;
// Namespaces: Importing
use \wctrn\realloc\Post;
echo ( new Post() )->get_content(), PHP_EOL;
// Namespaces: Aliasing
use \wctrn\realloc\Post as Talk;
echo ( new Talk() )->get_content(), PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment