05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

usleep<br />

void usleep(int time)<br />

Pauses execution of the current script for time microseconds.<br />

usort<br />

void usort(array array, string function)<br />

Sorts an array using a user-defined function. The supplied function is called with two<br />

parameters. It should return an integer less than 0 if the first argument is less than the<br />

second, 0 if the first and second arguments are equal, and an integer greater than 0 if the<br />

first argument is greater than the second. The sort order of two elements that compare<br />

equal is undefined. See Chapter 5 for more information on using this function.<br />

var_dump<br />

void var_dump(mixed name[, mixed name2[, ... mixed nameN]])<br />

Outputs information, including the variable’s type and value, about the given variables.<br />

The output is similar to that provided by print_r( ).<br />

version_compare<br />

int version_compare(string one, string two[, string operator])<br />

Compares two strings of the format “4.1.0” and returns -1 if one is less than two, 0 if they<br />

are equal, and 1 if one is greater than two. Ifoperator is specified, the operator is used to<br />

make a comparison between the version strings, and the value of the comparison using that<br />

operator is returned. The possible operators are < or lt; or gt; >= or ge; ==, =, or<br />

eq; and !=, , and ne.<br />

vprintf<br />

void vprintf(string format[, array values])<br />

Prints a string created by filling format with the arguments given in the array values. See<br />

printf for more information on using this function.<br />

vsprintf<br />

string vsprintf(string format[, array values])<br />

Creates and returns a string created by filling format with the arguments given in the array<br />

values. See printf for more information on using this function.<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

vsprintf | 455

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!