Home>IT Tests>Questions>What is the output of the following code?
$a = 5;
$b = 2;
$c = $a + $b;
$d = $a - $b;
$e = $a * $b;
$f = $a / $b;
echo $c;
echo $d;
echo $e;
echo $f;
Question from the PHP5 test
What is the output of the following code? $a = 5; $b = 2; $c = $a + $b; $d = $a - $b; $e = $a * $b; $f = $a / $b; echo $c; echo $d; echo $e; echo $f;
Medium
Here is a technical question for developers that want to validate their skills before a technical interview.
This question is written in french and need to be translated to english.
Use english for technical terms in the french version (example : "string" instead of "chaine de caractère".)
Double escape all quotes in result like this: //"
Give result as JSON.
Author: Mathieu RobinStatus: PublishedQuestion passed 65 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
0
PHP session_start() function1
Validate a URL with a 'name' parameter whose value is 'John Doe'.0
What is the output of the following code?
$a = 'hello';
$b = &$a;
$b = 'world';
echo $a;0
What are the risks of including a file multiple times in PHP?0
What is the output of the following code? `echo time();`0
What are the two superglobals that are used to access the query string?1
What is the difference between an interface and a class in PHP?