- get_called_class: documentation ( source)
- version_compare: documentation ( source)
- get_class: documentation ( source)
<?php
namespace Foo
{
class Bar
{
function __construct(){
echo get_called_class() . PHP_EOL;
echo get_class($this) . PHP_EOL;
echo __CLASS__ . PHP_EOL;
echo get_class(self) . PHP_EOL;
if (version_compare(PHP_VERSION, '5.5.0') >= 0) {
echo Bar::class . PHP_EOL;
}
}
}
$oBar = new Bar();
}
#EOF