<?php $a = '0'; $b = '1'; $b2 = 1; $b3 = true; $c = ''; $c2 = false; $c3 = null; $d = '-1'; $e = '2'; $f = 'abc'; function test($a) { if (!$a) { $a = 0; } if ($a != 1) { echo '1' . " "; } else { echo '0' . " "; } } function test2($a) { $a = (bool)$a; if (!$a) { echo '1' . "\n"; } else { echo '0' . "\n"; } } test($a);test2($a); test($b);test2($b); test($b2);test2($b2); test($b3);test2($b3); test($c);test2($c); test($c2);test2($c2); test($c3);test2($c3); test($d);test2($d); test($e);test2($e); test($f);test2($f);
You have javascript disabled. You will not be able to edit any code.