karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 52 of 143

ftp_alloc() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 208 Views

The ftp_alloc() function allocates space for a file to be uploaded to the FTP server. This function is useful when uploading large files to ensure sufficient disk space is available on the server before attempting the transfer. Syntax ftp_alloc(connection, size_of_file, res); Parameters connection − The FTP connection resource to use size_of_file − The number of bytes to allocate on the server res − Optional variable to store the server response message Return Value The ftp_alloc() function returns TRUE on success or FALSE on failure. Example The following example ...

Read More

tan() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 115 Views

The tan() function in PHP returns the tangent of a specified value in radians. It's a built-in mathematical function that calculates the ratio of sine to cosine for a given angle. Syntax tan(value) Parameters value − A numeric value representing an angle in radians (float or integer) Return Value The tan() function returns a float representing the tangent of the specified angle. Returns NaN for invalid inputs. Basic Examples Here are some basic examples demonstrating the tan() function ? 01.55740772465491 ...

Read More

sqrt() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 140 Views

The sqrt() function in PHP returns the square root of a number. It accepts any numeric value and returns a float representing the square root. Syntax sqrt(num) Parameters num − The number for which you want to find the square root. Can be an integer or float. Return Value The sqrt() function returns the square root of the specified number as a float. For negative numbers, it returns NAN (Not a Number). Examples Basic Square Root Finding the square root of a perfect square ? ...

Read More

zip_read() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 84 Views

The zip_read() function reads the next entry in a ZIP file archive. It iterates through entries sequentially, returning a resource for each file or directory found within the archive. Syntax zip_read(zip) Parameters zip − The zip resource to read, opened with zip_open() Return Value The zip_read() function returns a resource containing a file within the zip archive on success, or FALSE when there are no more entries to read. Example The following example demonstrates reading entries from a ZIP file. We have a zip file "new.zip" with the ...

Read More

zip_entry_read() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 129 Views

The zip_entry_read() function is used to get the contents from an open zip archive file entry in PHP. Syntax zip_entry_read(zip_entry, len) Parameters zip_entry − The zip entry resource. Required. len − The length in bytes to read. Optional, defaults to 1024. Return Value Returns the contents from an open zip archive file entry as a string. Returns FALSE on failure. Example Let's say we have a zip file "one.zip" containing a single file "detail.txt" with the following content − Asia is a continent! Here's ...

Read More

zip_entry_name() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 93 Views

The zip_entry_name() function returns the name of a directory entry inside a ZIP archive. This function is part of PHP's ZIP extension and works with ZIP archives opened using zip_open(). Syntax zip_entry_name(zip_entry) Parameters zip_entry − A directory entry resource from a ZIP file, obtained using zip_read() on an archive opened with zip_open(). Return Value The zip_entry_name() function returns the name of the ZIP archive entry as a string on success, or FALSE on failure. Example The following example demonstrates how to list all file names in a ZIP ...

Read More

zip_entry_close() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 107 Views

The zip_entry_close() function is used to close a zip archive entry that was previously opened by the zip_entry_open() function. This function is part of PHP's Zip File Functions extension. Syntax zip_entry_close(zip_entry) Parameters zip_entry − The zip entry resource that was opened using zip_entry_open(). Required. Return Value The zip_entry_close() function returns TRUE on success and FALSE on failure. Example The following example demonstrates how to use zip_entry_close() to properly close a zip entry after reading it ? filename.txt closed successfully! Key ...

Read More

sin() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 97 Views

The sin() function in PHP returns the sine of a number. It accepts a numeric value in radians and returns the corresponding sine value as a floating-point number. Syntax sin(number) Parameters number − A numeric value in radians for which you want to calculate the sine. Return Value The sin() function returns the sine of the given number as a float. The return value ranges between -1 and 1. Example 1 Here's a basic example demonstrating the sin() function with different radian values − ...

Read More

pow() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 252 Views

The pow() function in PHP calculates the power of a number by raising the base to the specified exponent. It handles positive, negative, and floating-point values. Syntax pow(base, exponent) Parameters base − The base number (can be integer or float) exponent − The exponent to raise the base to (can be integer or float) Return Value Returns the result of base raised to the power of exponent. Returns NAN for invalid operations like negative base with fractional exponent. Example 1: Basic Power Calculation Calculate 3 raised to the ...

Read More

octdec() function in PHP

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 104 Views

The octdec() function converts an octal number to its decimal equivalent. This function is useful when working with octal representations in PHP. Syntax octdec(octal_string) Parameters octal_string − A string containing the octal number to convert. Can include negative sign for negative numbers. Return Value The octdec() function returns the decimal equivalent of the specified octal number as an integer. Example 1: Basic Octal to Decimal Conversion Here's how to convert a simple octal number to decimal − 80 120 Example ...

Read More
Showing 511–520 of 1,421 articles
« Prev 1 50 51 52 53 54 143 Next »
Advertisements