Course 1: How to win friends & develop in PHP
Creating Functions
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 2

Put on your thinking cap and look carefully: what does this print?

<?php
/*
 * A Functions!
 */
function cat()
{
    $dog = dog();
    // $dog = strtoupper($dog);

    return $dog;
}

/* Another function */
function dog()
{
    return 'Molly';
}

$var = cat();
echo $var; echo ' the dog'; // echo '!';
Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.