
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
Found 1060 Articles for PHP

85 Views
The imagecolorexact() function gets the index of the specified color.Syntaximagecolorexact ( $img, $red, $green, $blue )Parametersimg: Image resource created with imagecreatetruecolor().red: Red color componentgreen: Green color componentblue: Blue color componentReturnThe imagecolorexact() function returns the index of the specified color in the palette, or -1 if the color does not exist.ExampleThe following is an example: Live DemoOutputThe following is the output:Array ( [0] => 1989170 [1] => 5273700 [2] => 1658930 )

58 Views
The imagecolorclosesthwb() function gets the index of the color which has the hue, white and blacknessSyntaximagecolorclosesthwb ( $img, $red, $green, $blue )Parametersimg: Create image with imagecreatetruecolor()red: Red color componentgreen: Green color componentblue: Blue color componentReturnThe imagecolorclosesthwb() function returns an integer with the index of the color which has the hue, white and blackness nearest the given color.ExampleThe following is an example: Live DemoOutputThe following is the output:HWB = 87

72 Views
The imagecolorclosestalpha() function gets the index of closet color with alpha value.Syntaximagecolorclosestalpha ( img, red, green, blue, alpha )Parametersimg: Image resource created with imagecreatetruecolor().red: Red color componentgreen: Green color componentblue: Blue color componentalpha: The transparency of image, with 0 indicating completely opaque, whereas 127 indicating completely transparent.ReturnThe imagecolorclosestalpha() function returns the index of the closest color in the palette.ExampleThe following is an example: Live Demo

317 Views
The imageflip() function is used to flip an image using given mode.Syntaxbool imageflip(img, mode )Parametersimg: An image resource created using imagecreatetruecolor()mode: The flip mode. Here are the possible values:IMG_FLIP_HORIZONTAL – Flips the image horizontally.IMG_FLIP_VERTICAL – Flips the image vertically.IMG_FLIP_BOTH – Flips the image both horizontally and vertically.ReturnThe imageflip() function returns TRUE on success or FALSE on failure.ExampleThe following is an example that flips an image horizontally:OutputThe following is the output:

386 Views
The imagepolygon() function is used to draw a polygon.Syntaxbool imagepolygon( $img, $points, $num_points, $color)Parameters$img: Create a blank image with imagecreatetruecolor() function.$points: An array with vertices of polygon.$num_points: Total number of vertices in a polygon.$color: A color identifier created with imagecolorallocate() function.ReturnThe imagepolygon() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

85 Views
The gmp_rootrem() function is used to calculate the nth root of a GMP number. It returns the integer component of the nth root and remainder.Syntaxgmp_rootrem($n,$root)Parametersn − It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.root − The root of the number nReturnThe gmp_rootrem()function returns the integer component of the nth root and remainder.ExampleThe following is an example −OutputThe following is the output −Array ( [0] => GMP Object ( [num] => 3 ) [1] => GMP Object ( [num] =>6 ) )

56 Views
The IntlChar getCombiningClass() function is used to get the combining class of the value val.Syntaxint IntlChar::getCombiningClass (val)Parametersval − An integer or character encoded as a UTF-8 string.ReturnThe IntlChar getCombiningClass() function returns the combining class of the value val.ExampleThe following is an example −OutputThe following is the output −int(0) NULL

45 Views
The IntlChar getUnicodeVersion() function is used to get the Unicode version.Syntaxarray IntlChar::getUnicodeVersion ()ParametersNAReturnThe IntlChar getUnicodeVersion() function returns thearray containing the Unicode version number.ExampleThe following is an example −OutputThe following is the output −array(4) { [0]=> int(6) [1]=> int(3) [2]=> int(0) [3]=> int(0) }

67 Views
The IntlChar getFC_NFKC_Closure() function is used to get the FC_NFKC_Closure property for the value val.SyntaxIntlChar::getFC_NFKC_Closure(val)Parametersval − An integer or character encoded as a UTF-8 string.ReturnThe IntlChar getFC_NFKC_Closure()function returns the FC_NFKC_Closure property string for the entered value val.ExampleThe following is an example −OutputThe following is the output −NULL string(0) "" NULL NULL

54 Views
The IntlChar getBidiPairedBracket() function is used to get the paired bracket character for the value val.SyntaxIntlChar::getBidiPairedBracket (val)Parametersval − An integer or character encoded as a UTF-8 string.ReturnThe IntlChar getBidiPairedBracket()function returns the mapped paired bracket.ExampleThe following is an example −OutputThe following is the output −int(15) string(1) ")" NULL string(1) "J"