Skip to content

Instantly share code, notes, and snippets.

@helhum
Created December 1, 2014 14:01
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 helhum/f0d922e4c08943317036 to your computer and use it in GitHub Desktop.
Save helhum/f0d922e4c08943317036 to your computer and use it in GitHub Desktop.
::class feature of PHP 5.5
<?php
namespace Baz;
use Bar\Foo;
define('LF', chr(10));
spl_autoload_register(function($className){
echo 'trying to load class: ' . $className . LF;
});
echo LF . 'starting ...' . LF;
$a = Foo::class;
echo 'class name calculated: ' . $a . LF;
class_exists($a);
echo 'finished!' . LF . LF;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment