这里的文档并不完全正确。
<?php
print_r()get_defined_constants();
die;
?>
将显示基本上
[PHP_YAF_VERSION] => 2.3.2
[YAF_ENVIRON] => product
[YAF_ERR_STARTUP_FAILED] => 512
[YAF_ERR_ROUTE_FAILED] => 513
[YAF_ERR_DISPATCH_FAILED] => 514
[YAF_ERR_AUTOLOAD_FAILED] => 520
[YAF_ERR_NOTFOUND_MODULE] => 515
[YAF_ERR_NOTFOUND_CONTROLLER] => 516
[YAF_ERR_NOTFOUND_ACTION] => 517
[YAF_ERR_NOTFOUND_VIEW] => 518
[YAF_ERR_CALL_FAILED] => 519
[YAF_ERR_TYPE_ERROR] => 521
所以使用 PHP_YAF_VERSION 而不是仅仅使用 YAF_VERSION