php教程

预定义常量

下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。

YAF_VERSION (string)
YAF_ENVIRON (string)
YAF_ERR_STARTUP_FAILED (integer)
YAF_ERR_ROUTE_FAILED (integer)
YAF_ERR_DISPATCH_FAILED (integer)
YAF_ERR_AUTOLOAD_FAILED (integer)
YAF_ERR_NOTFOUND_MODULE (integer)
YAF_ERR_NOTFOUND_CONTROLLER (integer)
YAF_ERR_NOTFOUND_ACTION (integer)
YAF_ERR_NOTFOUND_VIEW (integer)
YAF_ERR_CALL_FAILED (integer)
YAF_ERR_TYPE_ERROR (integer)

User Contributed Notes

lee dot howarth dot 90 at gmail dot com 03-Apr-2014 07:59
The documentation here is not fully correct.

<?php

    print_r
(get_defined_constants());
   die;

?>

Will show basically:

  [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

So use PHP_YAF_VERSION instead of just YAF_VERSION

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788