mardi 3 mars 2015

Why TRUE not given to function in class

I have some issues with my large project, i cant figure out why TRUE not given into function.


I have:



class Cat
{
public function abc ($a = FALSE)
{
if ($a)
{
print('YES');
}
else
{
print('NO');
}
}

private function meow ()
{

$blabla = $this->abc(TRUE);
//some code
}


It prints always NO


But this example in online redactor prints YES:



function abc ($a = FALSE)
{
if ($a)
{
print('YES');
}
else
{
print('NO');
}
}
abc(TRUE);

Aucun commentaire:

Enregistrer un commentaire