Skip to content

Instantly share code, notes, and snippets.

@corean
Created May 8, 2018 03:54
Show Gist options
  • Select an option

  • Save corean/573e8d27b57f4548337fb71a3f2830b2 to your computer and use it in GitHub Desktop.

Select an option

Save corean/573e8d27b57f4548337fb71a3f2830b2 to your computer and use it in GitHub Desktop.
php if AND연산자 확인용
<?php
echo ((true&&true)?'true<br>':'false<br>');
echo ((true&&false)?'true<br>':'false<br>');
echo ((false&&true)?'true<br>':'false<br>');
echo ((false&&false)?'true<br>':'false<br>');
/*
true
false
false
false
*/
echo '<br>';
echo (!(true||true)?'true<br>':'false<br>');
echo (!(true||false)?'true<br>':'false<br>');
echo (!(false||true)?'true<br>':'false<br>');
echo (!(false||false)?'true<br>':'false<br>');
/*
false
false
false
true
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment