Swoole 5 will remove PSR-0 underline style class name

  php, psr, swoole

Swoole in1.x - 4.xThe version also providesPSR-0Standardized Underline Style Class Names andPSR-4Namespace style of. At presentPSR-0The specification is already in21 October 2014Marked as abandoned, the latest replacement specification isPSR-4.

In the latest5In the version we plan toCompletely Remove Underlined Class Names. Please, everyoneSwooleThe user gradually changed the class name toPSR-4Standardized pure namespace style.

NowSwooleWe are gradually reconstructing and removing the old and backward design, which will become more and more exquisite in the future.

Correct

$server = new Swoole\Http\Server;
$server = new Swoole\Server;
$client = new Swoole\Coroutine\Http\Client;
$client = new Co\Http\Client;

Error

$server = new Swoole_Http_Server;
$server = new Swoole_Server;
$client = new Swoole_Coroutine_Http_Client;
$client = new Co_Http_Client;

In5.0Underline class names will no longer be supported in the version, those using the above style codesPHPFatal error that does not exist in the report class