Skip to Main Content
PHP in a Nutshell
book

PHP in a Nutshell

by Paul Hudson
October 2005
Intermediate to advanced content levelIntermediate to advanced
372 pages
11h 35m
English
O'Reilly Media, Inc.
Content preview from PHP in a Nutshell

Name

ini_get()

Synopsis

    string ini_get ( string varname )

The ini_get() function allows you to read a value from the php.ini file without altering it. It takes the name of the value to read as its only parameter and returns the value. Boolean values returned by ini_get() should be typecasted as integer; otherwise, false values will be returned as an empty string. For example:

    print "Display_errors is turned on: ";
    print (int) ini_get("display_errors");

Many numerical values in php.ini are represented using M for megabyte and other shortcuts. These are preserved in the return value of ini_get(), which means you should not rely on these values to be plain numbers.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP Cookbook

PHP Cookbook

Eric A. Mann
Programming PHP

Programming PHP

Rasmus Lerdorf, Kevin Tatroe
Learning PHP

Learning PHP

David Sklar

Publisher Resources

ISBN: 0596100671Errata Page