O'Reilly logo

Core PHP Programming, Third Edition by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15.2. Configuration

The following functions affect the operation of PHP. Some of them alter configuration variables. Others cause a script to stop executing for a period.

boolean bcscale(integer scale)

The bcscale function (Listing 15.1) sets the default scale for the functions that perform math on arbitrary-precision numbers. The scale is the number of digits after the decimal point. See the section on arbitrary-precision numbers in Chapter 13.

Listing 15.1. bcscale
<?php
    //use ten digits
    bcscale(10);
?>

clearstatcache()

Calling C's stat function (Listing 15.2) may take a considerable amount of time. To increase performance, PHP caches the results of each call. When you use a function that relies on stat, the information from the cache is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required