]> granicus.if.org Git - php/commitdiff
Extended var_dump to handle IS_RESOURCE somewhat.
authorAndrey Hristov <andrey@php.net>
Fri, 24 Sep 1999 18:57:02 +0000 (18:57 +0000)
committerAndrey Hristov <andrey@php.net>
Fri, 24 Sep 1999 18:57:02 +0000 (18:57 +0000)
ext/standard/var.c

index 9f1a21a5235dee76b44aae2cbb1ecfdb0a9fb6b5..f5d61dc1f5fbb1a30c180f207280cec5dca3d1eb 100644 (file)
@@ -117,6 +117,15 @@ void php_var_dump(pval **struc, int level)
                        i = sprintf(buf, "%*c}\n", level, ' ');
                        PHPWRITE(&buf[1], i - 1);
                        break;
+                       
+               case IS_RESOURCE: {
+                       int type;
+                       zend_list_find((*struc)->value.lval, &type);
+                       i = sprintf(buf, "%*cresource(%ld) of type %d\n", level, ' ',
+                                               (*struc)->value.lval, type);
+                       PHPWRITE(&buf[1], i - 1);
+                       break;
+               }
 
                default:
                        i = sprintf(buf, "%*ci:0\n", level, ' ');