Search Results
Gets file size SplFileInfo::getSize (PHP 5 >= 5.1.2, PHP 7, PHP 8) SplFileInfo::getSize — Gets file size
- getExtension
SplFileInfo::getExtension (PHP 5 >= 5.3.6, PHP 7, PHP 8)...
- getPathname
SplFileInfo::getPathname (PHP 5 >= 5.1.2, PHP 7, PHP 8)...
- openFile
Creates an SplFileObject object of the file. This is useful...
- getCTime
SplFileInfo::getCTime (PHP 5 >= 5.1.2, PHP 7, PHP 8)...
- getMTime
Returns the time when the contents of the file were changed....
- getBasename
Caution SplFileInfo::getBasename () is locale aware, so for...
- isDir
SplFileInfo::isDir (PHP 5 >= 5.1.2, PHP 7, PHP 8)...
- getPath
SplFileInfo::getPath (PHP 5 >= 5.1.2, PHP 7, PHP 8)...
- getExtension
Jul 11, 2025 · The SplFileInfo::getSize () function is an inbuilt function of Standard PHP Library (SPL) in PHP which is used to get file size in bytes. Syntax: int SplFileInfo::getSize( void ) Parameters: This function does not accept any parameter. Return values: This function returns the size of file in bytes. Below Programs illustrate the SplFileInfo::getSize () function in PHP. Program 1:
Return Values The filesize in bytes on success, or false on failure.
Simple usage example of `SplFileInfo::getSize ()`. The SplFileInfo::getSize function is a method provided by the PHP SplFileInfo class. It is used to obtain the size of a file, in bytes.
PHP Manual Errors/Exceptions A RuntimeException will be thrown if the file does not exist or an error occurs.
The SplFileInfo class Introduction The SplFileInfo class offers a high-level object-oriented interface to information for an individual file.
{"payload":{"allShortcutsEnabled":false,"fileTree":{"reference/spl/splfileinfo":{"items":[{"name":"construct.xml","path":"reference/spl/splfileinfo/construct.xml ...
