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 Build a Simple PHP Application Working With Functions Working with Functions

Function Return

In one of the questions of the Quiz:

function sum_two_numbers ($one,$two){
    $sum = $one + $two;
    return $sum;

I Selected 6, but is wrong. Is there something i didnt notice?

2 Answers

Randy Perez
Randy Perez
5,668 Points

The questions asks what does this code displays, and they only call the function but never print the result. Therefore the result is actually 6 as you mention but the code displays Nothing.

Hope it helps

humm, yes, your right, didnt notice, thanks