Created
December 1, 2014 14:01
-
-
Save helhum/f0d922e4c08943317036 to your computer and use it in GitHub Desktop.
::class feature of PHP 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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