0

Why is the output 1

Hey, I'm new to PHP so I just wanna know why the output for this code is 1 https://code.sololearn.com/wti97MwpOF2y/?ref=app

8th May 2020, 6:15 PM
Gottem
Gottem - avatar
1 Antwort
+ 1
== operator evaluates the values of variables and returns 1 in your example. In php true is equivalent with 1. === operator evaluates the value and type of the variables and returns null in your example
8th May 2020, 7:09 PM
Gabriel Ilie
Gabriel Ilie - avatar