Public feed #893908

Miscellany

public php v1 · immutable
Raw Edit
·published 2008-02-06 15:24 UTC
rendered paste body
<?phpfunction allEmpty( $var ){  $args = func_get_args( );  foreach( $args AS $value ) {    if( $value !== '' ) return false;  }  return true;}/** Usage: **/$a = 1; $b = ''; $c = '';if( !allEmpty( $a, $b, $c ) ) {  echo 'not all "empty".';}$a = '';if( allEmpty( $a, $b, $c ) ) {  echo 'all "empty"';}?>