PHP arithmetic expressions

  • psilvaj_12
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Dec 20, 2010
  • Posts: 9
  • Status: Offline

Post December 20th, 2010, 11:37 am

hello!

I'm trying to build a PHP page with some arithmetic expressions, but as the form is no data error messages appear to divide by zero, like this:

Warning: Division by zero in /home/teste/public_html/teste.php on line 385


How can I make these messages disappear?

thank you
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post December 20th, 2010, 11:37 am

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post December 20th, 2010, 12:23 pm

If you want the warning message not to appear you can disabled it with the error reporting function

http://php.net/manual/en/function.error-reporting.php
#define NULL (::rand() % 2)
  • psilvaj_12
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Dec 20, 2010
  • Posts: 9
  • Status: Offline

Post December 20th, 2010, 1:09 pm

thanks!

It worked.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 250 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.