Open In App

PHP SplFixedArray valid() Function

Last Updated : 23 Jun, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report
The SplFixedArray::valid() function is an inbuilt function in PHP which is used to check the array can contain more elements or not. Syntax:
bool SplFixedArray::valid()
Parameters: This function does not accept any parameter. Return Value: This function returns true on success, false otherwise. Below programs illustrate the SplFixedArray::valid() function in PHP: Program 1:
Output:
bool(true)
bool(false)
bool(false)
Program 2:
Output:
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
Reference: https://www.php.net/manual/en/splfixedarray.valid.php

Next Article

Similar Reads