Question from the PHP - Fundamentals test

Using the ternary operator to choose between two strings in PHP.

Medium

What is the output of the following code ?

$x = "welove";
$y = "devs";
$z = strlen('A') ? $x : $y;

echo $z;
Author: ThéoStatus: PublishedQuestion passed 1883 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!