
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

339 Views
The imagecolorat() function gets the index of the color of the pixel.Syntaximagecolorat( $img, $x, $y )Parametersimg: Create an image with imagecreatetruecolor() function.x: The x-coordinate of the point.y: The y-coordinate of the point.ReturnThe imagecolorat() function returns the color index or FALSE on failure.ExampleThe following is an example: Live DemoOutputThe following is the output:array(4) { ["red"]=> int(255) ["green"]=> int(255) ["blue"]=> int(255) ["alpha"]=> int(127) }

3K+ Views
The getimagesize() function is used to display the size of an image.Syntaxgetimagesize(file_name, img_info)Parametersfile_name: The file image i.e. the image path.img_info: Extract some extended information from the image file. Supports only JFIF files.ReturnThe getimagesize() function returns an array element with height, width, type, MIME type of the image, etc.ExampleThe following is an example: Live DemoOutputThe following is the output:Array ( [0] => 205 [1] => 120 [2] => 3 [3] => width="205" height="120" [bits] => 8 [mime] => image/png)

393 Views
The imagefill() function is used to fill the image.Syntaximagefill(img, x, y, color)ParametersimgCreate a blank image with imagecreatetruecolor().x x-coordinate of start pointy y-coordinate of start pointcolor The fill color.ReturnThe imagefill() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

90 Views
The imagedashedline() function draws a dashed line.Syntaximagedashedline( $image , $x1 , $y1 , $x2 , $y2 , $color )Parametersimage Create a blank image with imagecreatetruecolor().x1 Upper left x-coordinatey1 Upper left y-coordinatex2 Bottom right x-coordinatey2 Bottom right y-coordinatecolor The fill color.ReturnThe function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

1K+ Views
The imagefilledrectangle() function draws a filled rectangle.Syntaximagefilledrectangle( $img, $x1, $y1, $x2, $y2, $color )Parametersimage Create a blank image with imagecreatetruecolor().x1x-coordinate for point 1.y1 y-coordinate for point 1.x2 x-coordinate for point 2.y2 y-coordinate for point 2.color The fill color.ReturnThe imagefilledrectangle() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

165 Views
The imagefilledellipse() function is used to draw a filled ellipse.Syntaximagefilledellipse( $img, $cx, $cy, $width, $height, $color )Parametersimg This creates a blank image with imagecreatetruecolor()cx x-coordinate of the center.cy y-coordinate of the center.width The ellipse width.height The ellipse height.color The fill color.ReturnThe imagefilledellipse() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

74 Views
The gmp_or() function computes the bitwise OR of two GMP numbers.Syntaxgmp_or(n1, n2)Parametersn1: The first GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.n2: The second GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.ReturnThe gmp_or() function returns the OR of the GMP numbers. The result is also a GMP number.ExampleThe following is an example:OutputThe following is the output:7

90 Views
The IntlChar isgraph()function checks that the entered value is a graphic character or not.Syntaxbool IntlChar::isgraph (val)Parametersval − An integer or character encoded as a UTF-8 string.ReturnThe IntlChar isgraph() function returns TRUE of val is a graphic character.ExampleThe following is an example −OutputThe following is the output −bool(true) bool(false) bool(false) bool(true)

51 Views
The IntlChar isMirrored()function is used to check whether the entered value contains Bidi_Mirrored property or not.Syntaxbool IntlChar::isMirrored (val)Parametersval − An integer or character encoded as a UTF-8 string.ReturnThe IntlChar isMirrored()function returns TRUE if the entered value has the Bidi_Mirrored propertyExampleThe following is an example −OutputThe following is the output −bool(true) bool(true) bool(false) bool(false)

101 Views
TheIntlChar::isblank() function checks whether the entered value isblank or horizontal space character.SyntaxIntlChar::isblank (val)Parametersval − An integer or character encoded as a UTF-8 string.ReturnThe IntlChar::isblank() function returns TRUE if the entered value isblank or horizontal space character.ExampleThe following is an example −OutputThe following is the output −bool(true) NULL bool(false) bool(false)