PHP - What exactly does “: bool” for example means after a PHP function? [duplicate]

35
January 12, 2019, at 1:00 PM

This question already has an answer here:

  • Colon after method declaration? 2 answers

On this site: http://php.net/manual/de/function.is-int.php

there's a function that checks if a value is an integer.

The function:

is_int ( mixed $var ) : bool

What does the ": bool" do exactly?

Answer 1

The function returns a value of bool type.

Bool can be true or false.

READ ALSO
How to make query-selector work inside php and calculate?

How to make query-selector work inside php and calculate?

I took a look at this job pricing calculator I found on Codepen and I made it work exactly how it's shown on the pen but I wanted to take it one step furtherI wanted to tie this in with phpmailer but the issue I am having is that the query selector script...

29
Length of array saved in entry 0?

Length of array saved in entry 0?

i read information out of a MSSQL database and save this into arrays with a length of 2000When i echo the entries i get the length of these arrays in the first entry (e

26
PHP: How to create a function to generate string with defined max and min length?

PHP: How to create a function to generate string with defined max and min length?

I want to create a self-defined string with defined length of the stringIt appears the PHP itself isn't providing me the function I desire

28