<?php
//phpinfo();die;
var_dump(get_declared_classes());die;
?>
运行结果:
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b> <i>(size=144)</i>
0 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'stdClass'</font> <i>(length=8)</i>
1 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'Exception'</font> <i>(length=9)</i>
2 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'ErrorException'</font> <i>(length=14)</i>
3 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'Closure'</font> <i>(length=7)</i>
4 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'Generator'</font> <i>(length=9)</i>
5 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'DateTime'</font> <i>(length=8)</i>
6 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'DateTimeImmutable'</font> <i>(length=17)</i>
7 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'DateTimeZone'</font> <i>(length=12)</i>
8 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'DateInterval'</font> <i>(length=12)</i>
9 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'DatePeriod'</font> <i>(length=10)</i>
<i>more elements...</i>
</pre>
解决方法 在php.ini文件添加 xdebug.var_display_max_children = 10000
[xdebug]
xdebug.remote_enable = off
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/fghjk/apache/tmp"
xdebug.show_local_vars=0
xdebug.var_display_max_children = 10000
再次运行所有结果
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b> <i>(size=144)</i>
0 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'stdClass'</font> <i>(length=8)</i>
1 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'Exception'</font> <i>(length=9)</i>
2 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'ErrorException'</font> <i>(length=14)</i>
......
140 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'SQLite3'</font> <i>(length=7)</i>
141 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'SQLite3Stmt'</font> <i>(length=11)</i>
142 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'SQLite3Result'</font> <i>(length=13)</i>
143 <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'XSLTProcessor'</font> <i>(length=13)</i>
</pre>