recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
(PHP 4 >= 4.2.0, PHP 5)
debug_zval_dump -- Dumps a string representation of an internal zend value to outputDumps a string representation of an internal zend value to output.
Beware the refcount: The refcount value returned by this function is non-obvious in certain circumstances. For example, a developer might expect the above example to indicate a refcount of 2. The third reference is created when actually calling debug_zval_dump().
This behavior is further compounded when a variable is not passed to debug_zval_dump() by reference. To illustrate, consider a slightly modified version of the above example:
Why refcount(1)? Because a copy of $var1 is being made, when the function is called.
This function becomes even more confusing when a variable with a refcount of 1 is passed (by copy/value):
A refcount of 2, here, is extremely non-obvious. Especially considering the above examples. So what's happening?
When a variable has a single reference (as did $var1 before it was used as an argument to debug_zval_dump()), PHP's engine optimizes the manner in which it is passed to a function. Internally, PHP treats $var1 like a reference (in that the refcount is increased for the scope of this function), with the caveat that if the passed reference happens to be written to, a copy is made, but only at the moment of writing. This is known as "copy on write."
So, if debug_zval_dump() happened to write to its sole parameter (and it doesn't), then a copy would be made. Until then, the parameter remains a reference, causing the refcount to be incremented to 2 for the scope of the function call.
| var_dump() |
| debug_backtrace() |
| References Explained |
| Reference Counting and Aliasing (by Andi Gutmans) |
| References Explained (by Derick Rethans) |
Another Useful functions:
zend-api.zend-output-debug-string | zend-api.zend-fetch-debug-backtrace | function.samconnection-setdebug | function.ociinternaldebug | function.oci-internal-debug | function.mysqli-dump-debug-info | function.mysqli-debug | function.memcache-debug | function.maxdb-dump-debug-info | function.maxdb-debug | function.debugger-on | function.debugger-off | function.debug-zval-dump | function.debug-print-backtrace | function.debug-backtrace | debugger | debugger-using | debugger-protocol |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.