Found 1046 Articles for PHP

tan() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 10:02:10

42 Views

The tan() function returns the tangent of the specified value.Syntaxtan(val)Parametersval − A value in radiansReturnThe tan() function returns the tangent of the specified value val.Example Live DemoOutput01.5574077246549ExampleLet us see another example − Live DemoOutput1ExampleLet us see another example − Live DemoOutput0.54630248984379-0.54630248984379ExampleLet us see another example − Live DemoOutput3.3805150062466-0.64836082745909

srand() function in PHP

Samual Sam
Updated on 27-Dec-2019 10:01:04

140 Views

The mt_srand() function seeds the random number generator.Note − Random number generator is seeded automatically after the release of PHP 4.2.0. This function is not needed now.Syntaxsrand(seed)Parametersseed − The seed valueReturnThe srand() function Returns nothing.Example Live DemoOutput664617053ExampleLet us see another example − Live DemoOutput4

sqrt() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 10:00:14

53 Views

The sqrt() function Returns the square root of a number.Syntaxsqrt(num)Parametersnum − The number for which you want to find the square rootReturnThe sqrt() function Returns the square root of the specified number.Example Live DemoOutput4ExampleLet us see another example − Live DemoOutput0.5ExampleLet us see another example − Live DemoOutputNAN

sinh() function in PHP

Samual Sam
Updated on 27-Dec-2019 09:59:16

52 Views

The sinh() function Returns the hyperbolic sine of a number equivalent to.(exp(num) - exp(-num))/2)Syntaxsinh(num)Parametersnum − The number for which you want to Return the hyperbolic sine. A value in radians.ReturnThe sinh() function Returns the hyperbolic sine of a number.Example Live DemoOutput01.1752011936438ExampleLet us see another example − Live DemoOutput11.5487393572582.3012989023073

zip_read() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 09:58:15

26 Views

The zip_read() function reads the next entry in a ZIP file archive.Syntaxzip_read(zip)Parameterszip − The zip resource to readReturnThe zip_read() function returns a resource containing a file within the zip archive on success.ExampleThe following is an example, wherein we have a zip file "new.zip", with the following files.amit.txt peter.txt result.html demo.java settings.iniExampleLet us now see the example:OutputFile Name = amit.txt File Name = peter.txt File Name = result.html File Name = demo.java File Name = settings.ini

zip_open() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:56:31

38 Views

The zip_open() function opens a zip file for reading. It returns an open zip file on success and FALSE on failure.Syntaxzip_open(zip_file)Parameterszip_file − The path of the file to be opened.ReturnThe zip_open() function returns an open zip file on success and FALSE on failure.ExampleOutputCompressed: 90 Compressed: 12 Compressed: 67

zip_entry_read() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 07:29:57

34 Views

The zip_entry_read() function is used to get the contents from an open zip archive file.Syntaxzip_entry_read(zip_entry, len)Parameterszip_entry − The zip entry resource. Required.len − The length in bytes. The default is 1024.ReturnThe zip_entry_read() function Returns the contents from an open zip archive file. Returns FALSE on failure.ExampleThe following is an example. Let’s say our zip file "one.zip" is having only a single file i.e. "detail.txt" with the following content.Asia is a continent!Let us see an example −ExampleOutputText in the file = Asia is a continent!Read More

zip_entry_open() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:57:24

43 Views

The zip_entry_open() function is used to open a zip archive entry for reading.Syntaxzip_entry_open(zip_file,zip_entry,mode)Parameterszip_file − The zip file to be readzip_entry − The zip entry to open.mode − The type of access needed for zip archiveReturnThe zip_entry_open() function Returns TRUE on success, or FALSE on failure.Example

zip_entry_name() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:57:57

46 Views

The zip_entry_name() function returns the name of the zip archive file.Syntaxzip_entry_name(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_name() function returns the name of the zip archive file.The following is an example. Let’s say we have 5 files in the zip archive "new.zip".ExampleOutputFile Name = amit.txt File Name = peter.txt File Name = result.html File Name = demo.java File Name = settings.ini

zip_entry_filesize() function in PHP

Samual Sam
Updated on 26-Jun-2020 10:01:55

48 Views

The zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.Syntaxzip_entry_filesize(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.Example

Advertisements