Jump to content

DimitriDV

Members
  • Posts

    48
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

DimitriDV's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Use cache with an expiration date of 2225 If you want to update your css file, use a new filename like css_file_v2.css
  2. Sorry, I am still receiving the same error
  3. Fatal error: func_get_args(): Can't be used as a function parameter in MathClass.php on line 6
  4. What is the solution?
  5. Hi there, I am starting to learn OO PHP programming. After running math.php, it gives an output 'Use only numbers'. Why? I don't understand this. math.php <?php require('MathClass.php'); $c = new MathClass(); echo $c->add(5,10,15,20); ?> MathClass.php <?php class MathClass{ function add(){ $args = func_num_args(); $sum = 0; $i = 0; for ($i ; $i < $args ; $i++){ is_int(func_get_args($i)) ? $sum += func_get_args($i) : die('Use only numbers'); } return $sum; } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.