What should be passed into if() to print 'Hello World'?

logic, php

Solution

I needs to evaluate to false, and print "Hello" at the same time. `printf` returns the length of outputted string upon success which is evaluated to `true` when read in a Boolean context. So reversing that will evaluate to false, executing the else block.

if(!printf("Hello ")){

} else {
   echo "World";
}

Problem

What should be passed into the if() to print the output as "Hello World"? [Note: It should execute the else block.] ``` if(?){ } else { echo "World"; } ```

Original source