Found 1046 Articles for PHP

zip_entry_compressionmethod() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 10:02:29

32 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

zip_entry_compressed_size() function in PHP

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

43 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

zip_entry_close() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:52:55

32 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

zip_close() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:53:23

33 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

sin() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 07:07:09

39 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

round() function in PHP

Samual Sam
Updated on 27-Dec-2019 07:05:22

160 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

rand() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 07:03:56

149 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

rad2deg() function in PHP

Samual Sam
Updated on 27-Dec-2019 07:02:47

46 Views

The rad2deg() function converts radian value to degree value. It Returns the equivalent of radia value val in degrees.Syntaxrad2deg(val)Parametersval − The radian value to be converted into degree.ReturnThe rad2deg() function Returns the equivalent of val in degrees.Example Live DemoOutput180ExampleLet us see another example − Live DemoOutput90ExampleLet us see another example − Live DemoOutput22.5

pow() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 07:01:25

132 Views

The pow() function Returns a raised to the power of b.Syntaxpow(a,b)Parametersa − The baseb − The exponentReturnThe pow() function Returns a raised to the power of b.Example Live DemoOutput243ExampleLet us see another example − Live DemoOutput4096-5.0805263425291E-5ExampleLet us see another example − Live DemoOutputNAN

pi() function in PHP

Samual Sam
Updated on 27-Dec-2019 06:57:57

80 Views

The pi() function Returns the value of Pi (π).Syntaxpi()ParametersNAReturnThe pi() function Returns the approximate value of PI. This value is a floating point value.3.1415926535898Example Live DemoOutput3.1415926535898ExampleLet us see another example to get the value of PI Live DemoOutput3.1415926535898

Advertisements