Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Jerry Hall
Jerry Hall
112 Points

Bug? Arithmetic Operator increment operator not working in Console.

Bug? Following precisely https://teamtreehouse.com/library/arithmetic-operators. @2:45 & $a++; isn't working when run.

Jerry Hall
Jerry Hall
112 Points

The above message is when running numbers.php as shown in the video with $a++; on line 24 A few seconds later when seeing the var_dump($a); I get a return of int(7) after running the page.

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! It's not a bug. You get exactly what Alena gets as well. $a starts at 5. Then we add one to it and do a var_dump at which point it prints out int(6). Then we do $a++ and another var_dump which prints out int(7). Both of these var_dumps can be seen at 2:49 in the video.

Hope this helps! :sparkles:

Jerry Hall
Jerry Hall
112 Points

Thanks Jennifer. Could you tell me if you want to know about typos in the text? It would be great if there was a little icon on pages so we could alert you without having to create a ticket. Thanks.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I'm not Treehouse staff. I'm simply a moderator and a student just like yourself. For suggestions, you should probably contact support :smiley: