Data Structure
 Networking
 RDBMS
 Operating System
 Java
 MS Excel
 iOS
 HTML
 CSS
 Android
 Python
 C Programming
 C++
 C#
 MongoDB
 MySQL
 Javascript
 PHP
- Selected Reading
 - UPSC IAS Exams Notes
 - Developer's Best Practices
 - Questions and Answers
 - Effective Resume Writing
 - HR Interview Questions
 - Computer Glossary
 - Who is Who
 
Programming Articles - Page 3006 of 3366
 
			
			84 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
 
			
			75 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
 
			
			98 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
 
			
			61 Views
The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.Syntaxzip_entry_compressionmethod()Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_compressionmethod() function returns the compression method of a zip archive entry.The following is an example. Let’s say we have 3 files in our zip archive "new.txt", therefore the compression method for all of these files will get displayed.ExampleOutputCompression Method = deflated Compression Method = deflated Compression Method = deflated
 
			
			73 Views
The zip_entry_compressed_size() function returns the compressed file size of a zip archive entry.Syntaxzip_entry_compressed_size(zip_entry)Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_compressed_size() function returns the compressed file size of a zip archive entry.The following is an example that gets the size of the files in "new.zip" archive.ExampleOutputCompressed: 90 Compressed: 12 Compressed: 67
 
			
			77 Views
The zip_entry_close() function is used to close a zip archive opened by the zip_entry_open() function.Syntaxzip_entry_close(zip_entry)Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_close() function Returns TRUE on success and FALSE on failure.The following is an example. Let’s say we have "new.zip" file as our archive.Example
 
			
			74 Views
The zip_close() function is used to close the zip file archive. The zip is opened by the zip_open() function.Syntaxzip_close(zip_file)Parameterszip_file − A zip file opened with zip_open() is to be mentioned here. This is the file we want to close.ReturnThe zip_close() function returns nothing.ExampleOutputFile will be closed now
 
			
			76 Views
The sin() function Returns the sine of a number.Syntaxsin(num)Parametersnum − The number for which you want to Return the sine. A value in radians.ReturnThe sin() function Returns the arc sine of a number.Example Live DemoOutput0.4794255386042-0.78332690962748ExampleLet us see another example − Live DemoOutput00.8414709848079-0.84147098480790.90929742682568
 
			
			210 Views
The round() function rounds a floating point number. For example, 0.90 to 1, 0.35 to 0, etc.Syntaxround(val, precision, mode)Parametersval − The value to roundprecision − It sets the precision i.e. the number of decimal digits to round tomode − A constant that specify the following rounding modePHP_ROUND_HALF_UP - The constant rounds val up to precision decimal, when it is half way there. Rounds 1.5 to 2 and -1.5 to -2. DefaultPHP_ROUND_HALF_DOWN - The constant rounds val down to precision decimal places, when it is half way there. Rounds 1.5 to 1 and -1.5 to -1PHP_ROUND_HALF_EVEN - It rounds val to ... Read More
 
			
			233 Views
The rand() function gets a random number. You can also set a range to get random number from that particular range.Syntaxrand(); or rand(min_range,max_range);Parametersmin_range − Default is 0. This is the lowest number to be Returned.max_range − This is the highest number to be Returned.ReturnThe rand() function Returns a random integer between min_range and max_range.Example Live DemoOutput158122727010940012273063370521512118877894804115835633ExampleLet us see another example − Live DemoOutput4114