joey@linux-wbnv:/tmp$ echo '<?php $a = array(1); count($a);' > 1
joey@linux-wbnv:/tmp$ gdb php
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) br zif_count
Breakpoint 1 at 0x8294399: file /home/joey/src/php/php-5.3.0/ext/standard/array.c, line 305.
(gdb) r -f 1
Starting program: /usr/bin/php -f 1
[Thread debugging using libthread_db enabled]
[New Thread 0xb77e18f0 (LWP 825)]
[Switching to Thread 0xb77e18f0 (LWP 825)]
Breakpoint 1, zif_count (ht=1, return_value=0x9ca7f74, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /home/joey/src/php/php-5.3.0/ext/standard/array.c:305
305 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &array, &mode) == FAILURE) {
(gdb) p *return_value
$1 = {value = {lval = 0, dval = 0, str = {val = 0x0, len = 0}, ht = 0x0, obj = {handle = 0, handlers = 0x0}}, refcount__gc = 1, type = 0 '\0', is_ref__gc = 0 '\0'}
(gdb)