What output results from the following code?... | Sololearn: Learn to code for FREE!

0

What output results from the following code?...

<?php $num = 18; $num--; echo$num; ?> please!!!...help me. heee.i

9/30/2017 9:45:36 PM

Moch Sobur

12 Answers

New Answer

+5

Did you try to copy past the code in code playground section ?

+2

It will echo 17 $variable-- is the post decrement operator. First it will give 18 then decrease by one. If it was like: $num = 18 echo $num--; Output would be: 18 Since it is post decrement, directly using it with echo will output original number.

+2

+2

The Answer is 17

+1

+1

17

+1

0

thanks solmate

0

ERROR!

0

its 7 dumb heads!!!!!!!!!!!!!!!!!!!!!!!!!!!!

0

The ans is x

-1

Output is 17 thanks lovegraphist on solo learn