0

What output results from the following code?...

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

30th Sep 2017, 9:45 PM
Moch Sobur
Moch Sobur - avatar
14 Respostas
+ 5
Did you try to copy past the code in code playground section ?
30th Sep 2017, 9:46 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 5
The Answer is 17
7th Dec 2020, 1:53 AM
Stiffler Bernard Awuah
Stiffler Bernard Awuah - avatar
+ 3
its 7
4th Dec 2020, 2:49 PM
MIKAH PALQUIRAN
MIKAH PALQUIRAN - avatar
+ 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.
30th Sep 2017, 11:02 PM
Hasan MĂŒcahit Bulut
Hasan MĂŒcahit Bulut - avatar
+ 2
17
12th Jul 2020, 1:03 PM
DOAA
DOAA - avatar
+ 1
17
22nd Dec 2017, 3:56 PM
Md Nobe Hosain Bappa
Md Nobe Hosain Bappa - avatar
+ 1
17
16th Dec 2020, 11:15 AM
Hasan A.R
Hasan A.R - avatar
0
thanks solmate
10th Oct 2017, 6:20 AM
Moch Sobur
Moch Sobur - avatar
0
ERROR!
18th Nov 2017, 1:39 PM
yagnik
0
Output is 17 thanks lovegraphist on solo learn
23rd Feb 2018, 5:33 PM
Abdullahi Opeyemi
Abdullahi Opeyemi - avatar
0
its 7 dumb heads!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27th Feb 2020, 5:19 PM
Alyssa Kay
Alyssa Kay - avatar
0
The ans is x
7th Jul 2020, 8:04 PM
Faith Mundi
Faith Mundi - avatar
0
What output results from the following code?
25th Oct 2021, 8:59 PM
Baali
0
17
5th Dec 2022, 3:04 AM
Kayanja David Walker
Kayanja David Walker - avatar