// Фильтруем полученные данные $del = $_GET['del'] * 1; 

This is part of the code and the training course (guestbook), please explain what the asterisk and unit means?

  Спасибо! 
  • one
    it means nonsense. :) because neither to the village nor to the city. - Artem
  • I agree that this is nonsense, but in fact the effect will be the same as from the use of the intval () function. - Deonis

2 answers 2

Equivalent to (int)$_GET['del']

  • Not equivalent. - Deonis
  • Explain!? - Maksym Prus
  • 2
    For example: $ str = '15 .5 '; echo $ str * 1; // 15.5 echo (int) $ str; // 15 - Deonis
  • I agree, you're right - Maksym Prus
  • but for the guest book (int) you probably need to remove iidishniki from the base, so it is better to use (int) than floatval (). - Maksym Prus
 $_GET['del'] * 1 

This is not the correct filtering! And this is equivalent to - +$_GET['del']