|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-11-05 19:53 UTC] zelnaga at gmail dot com
Description: ------------ <http://php.net/dom.constants> mentions the constants, their values, and gives a description of each. <http://php.net/com.constants> mentions the constants and that's it. <http://php.net/variant-get-type> returns an int. What constant does that int correspond to? Looking at the documentation, such as it currently is, sure isn't going to tell you. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 09:00:02 2026 UTC |
Here's a script that'll enumerate on the constants and their values: <?php $constants = array( 'CLSCTX_INPROC_SERVER', 'CLSCTX_INPROC_HANDLER', 'CLSCTX_LOCAL_SERVER', 'CLSCTX_REMOTE_SERVER', 'CLSCTX_ALL', 'VT_NULL', 'VT_EMPTY', 'VT_UI1', 'VT_I2', 'VT_I4', 'VT_R4', 'VT_R8', 'VT_BOOL', 'VT_ERROR', 'VT_CY', 'VT_DATE', 'VT_BSTR', 'VT_DECIMAL', 'VT_UNKNOWN', 'VT_DISPATCH', 'VT_VARIANT', 'VT_I1', 'VT_UI2', 'VT_UI4', 'VT_INT', 'VT_UINT', 'VT_ARRAY', 'VT_BYREF', 'CP_ACP', 'CP_MACCP', 'CP_OEMCP', 'CP_UTF7', 'CP_UTF8', 'CP_SYMBOL', 'CP_THREAD_ACP', 'VARCMP_LT', 'VARCMP_EQ', 'VARCMP_GT', 'VARCMP_NULL', 'NORM_IGNORECASE', 'NORM_IGNORENONSPACE', 'NORM_IGNORESYMBOLS', 'NORM_IGNOREWIDTH', 'NORM_IGNOREKANATYPE', 'NORM_IGNOREKASHIDA', 'DISP_E_DIVBYZERO', 'DISP_E_OVERFLOW', 'MK_E_UNAVAILABLE' ); foreach ($constants as $constant) { echo $constant . ' == ' . constant($constant) . '<br />'; } ?> Note how NORM_IGNOREKASHIDA yields a "Couldn't find constant" warning. At least it does for me...