Open In App

PHP SplFixedArray setSize() Function

Last Updated : 23 Jun, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report
The SplFixedArray::setSize() function is an inbuilt function in PHP which is used to set the size of the array. Syntax:
bool SplFixedArray::setSize( $size )
Parameters: This function accepts a single parameter $size which specifies the size of the array. Return Value: This function returns true on success, false otherwise. Below programs illustrate the SplFixedArray::setSize() function in PHP: Program 1:
Output:
50
110
Program 2:
Output:
0
9
100
878
100
200
Reference: https://www.php.net/manual/en/splfixedarray.setsize.php

Next Article

Similar Reads