PHP Type Coercion with echo(), data-type of output. Is my example correct?

I have some examples in the attachment picture here, and I just want to confirm that the data types that I think I'm 'coercing' into are actually correct.

For example, echo(string) true returns
1
. Here, I think that means that the returned
1
is a string data-type, and that it's a string data-type because of my 'string' argument.

Whereas, for another example, echo(int) 3.14 <-- here I'm coercing a float into an integer. So when this returns a 3, I can assume that the 3 is an integer correct? Because I used the 'int' argument, right?

Everything written in red in my attmt picture is the data-type that I think things are being coerced into.
Screenshot_2023-11-29_at_9.08.36_AM.png
Was this page helpful?