Which one of the following PHP functions can be used to find files *?

// get all php files AND txt files $files = glob(‘*. {php,txt}’, GLOB_BRACE); print_r($files); /* output looks like: Array ( [0] => phptest.

Which PHP functions can be used to find files?

PHP Filesystem Functions

Function Description
fwrite() Writes to an open file (binary-safe)
glob() Returns an array of filenames / directories matching a specified pattern
is_dir() Checks whether a file is a directory
is_executable() Checks whether a file is executable

Which of the following PHP function is used to determine a files last access time?

The fileatime() function in PHP is an inbuilt function which is used to return the last access time of a specified file.

IT IS IMPORTANT:  Best answer: How do you handle a large list in Java?

Which one of the following PHP functions can be used to build a function that accepts any number of arguments?

7 Answers. In PHP, use the function func_get_args to get all passed arguments.

Which one of the following PHP functions can be used to build a function that accepts any number of arguments Mcq?

Solution(By Examveda Team)

php function foo() { $args = func_get_args(); foreach ($args as $k => $v) { echo “arg”. ($k+1).

How many types of functions are available in PHP?

Types of Functions in PHP. There are two types of functions as: Internal (built-in) Functions. User Defined Functions.

What is the use of sprintf () function in PHP?

The sprintf() function in PHP is used to write a formatted string to a variable and returns a formatted string.

What is PHP call function?

A function is a self-contained block of code that performs a specific task. PHP has a huge collection of internal or built-in functions that you can call directly within your PHP scripts to perform a specific task, like gettype() , print_r() , var_dump , etc.

Which of the following function is used to determine object type?

6. Which one of the following functions is used to determine object type? Explanation: The is_a() function returns true if object belongs to a class type or if it belongs to a class that is a child of that class.

Which of the following function is used to read data from file?

C File management

function purpose
fprintf () Writing a block of data to a file
fscanf () Reading a block data from a file
getc () Reads a single character from a file
putc () Writes a single character to a file
IT IS IMPORTANT:  Best answer: Are SQL and Python used together?

Which function is used to build a function that accepts any number of arguments?

In mathematics and in computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages. The term variadic is a neologism, dating back to 1936–1937.

Which function in PHP is used to get the length of string variable?

PHP strlen() Function

The strlen() is a built-in function in PHP which returns the length of a given string. It takes a string as a parameter and returns its length. It calculates the length of the string including all the whitespaces and special characters.

Which PHP function is used to generate unique ID?

The uniqid() function in PHP is an inbuilt function which is used to generate a unique ID based on the current time in microseconds (micro time).

Which of the following is not a built-in string functions in PHP?

3. Which of the following is not a Built-in String functions in php? Explanation: strreverse() function is not a Built-in String functions in php.

Why should we use functions?

The first reason is reusability. Once a function is defined, it can be used over and over and over again. You can invoke the same function many times in your program, which saves you work. … Another aspect of reusability is that a single function can be used in several different (and separate) programs.

Which of the following is not a built-in function in PHP?

2. Which of the following is not a built-in function in php ? Explanation: fclosed() is not a built-in function in php.

IT IS IMPORTANT:  Quick Answer: Is Java safe to download on PC?
Categories PHP