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

Miscellaneous Functions

This chapter discusses a variety of functions that don't really fit neatly into existing categories, but that we felt were too important and useful to leave out of this book. Accordingly, we'll simply categorize them as "miscellaneous."

OverviewThis section contains functions for the following tasks:

  • Working with constants

    constant() - Returning the value of a constant

    define() - Defining a named constant

    defined() - Checking whether a given named constant exists

  • Ending script execution

    die() - Outputting a message and terminating the current script

    exit() - Terminating the current script

  • Evaluating strings as PHP code

    eval() - Evaluating a string as PHP code

  • Retrieving information about the capabilities of a browser

    get_browser() - Telling what the user's browser is capable of

  • Performing syntax highlighting for PHP

    highlight_file() - Syntax highlighting of a file

    highlight_string() - Syntax highlighting of a string

    show_source() - Syntax highlighting of a file

  • Parsing IPTC blocks

    iptcparse() - Parses a binary IPTC block into single tags

  • Leaking memory

    leak() - Leaks memory

  • Delaying the execution of a script

    sleep() - Delays execution

    usleep() - Delays execution in microseconds

Configuring the Miscellaneous FunctionsNo configuration directives currently affect how the miscellaneous functions work.

Installing Miscellaneous Function SupportThe Miscellaneous functions are built into PHP by default. If desired, individual functions can be disabled in the php.ini file via the disable_functions directive.

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.