Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] New question with answer #6947

Open
2 of 5 tasks
VIDAL-Antoine opened this issue Dec 1, 2023 · 1 comment
Open
2 of 5 tasks

[PHP] New question with answer #6947

VIDAL-Antoine opened this issue Dec 1, 2023 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@VIDAL-Antoine
Copy link

  • New question

Question. What is the output of this script?

$believable = 'false';
$myth = 'The moon is made of green cheese';
$calc = 10**3+1;
if ($believable) {
    echo $myth;
}
else {
    echo $calc;
}
  • 10000
  • 31
  • 1001
  • The moon is made of green cheese

Explanation : 'false' evaluates to true since it is a string so the if condition is met.

php-quiz

php-quiz-proof

@haxkd
Copy link
Contributor

haxkd commented Dec 2, 2023

solved #6948

@Ebazhanov Ebazhanov added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants