jeudi 17 mai 2018

Strange if statement in php

I'm not using php as my main back end language, but sometime I like to test some things on different languages and I saw that this if won't work. Why? $var is string so it exists.

$var = '0';

if($var) {
  echo 'a';
}

Aucun commentaire:

Enregistrer un commentaire