What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.

Variable-Related Functions

The Variable-Related functions provide tools for inspecting, transforming, serializing, and deleting variables.

Overview PHP's variable-related functions are a key part of the language. Skilled programmers rely on them extensively to build robust code that uses type-checking. Functions such as var_dump() and print_r() are also invaluable when debugging.

Here is a quick, task-based overview of the function group:

  • Cast a value from one type to another: doubleval() , intval() , strval()

  • Set the type of a variable: settype()

  • Determine the type of a variable: is_array() , is_bool() , is_double() , is_float() , is_int() , is_integer() , is_long() , is_null() , is_numeric() , is_object() , is_real() , is_resource() , is_scalar() , is_string() , get_resource_type() , gettype()

  • Destroy variables: unset()

  • Gather information about variables: empty() , get_defined_vars() , isset() , print_r() , var_dump()

  • Serialize and unserialize variables: serialize() , unserialize()

Configuring Variable-Related FunctionsThe following configuration directives affect how PHP handles variables.

Directive Name Value Type Description
error_reporting integer

If the error-reporting level set includes E_NOTICE, the use of uninitialized variables will be reported.

Installing Variable-Related Functions Support These functions are built into PHP by default and can only be disabled by editing the source code and recompiling or by using the disable_functions directive in php.ini.

Additional InformationFor more information on variables, types, and the variable -related functions, see:

PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at The authors of this book have elected not to choose any options under the OPL. This online book was obtained from and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.