Skip to content

Instantly share code, notes, and snippets.

@supercow
Created June 25, 2013 18:54
Show Gist options
  • Save supercow/5861256 to your computer and use it in GitHub Desktop.
Save supercow/5861256 to your computer and use it in GitHub Desktop.
$case_val = 'CamelCase'
$select_val = 'CamelCase'
case $case_val {
'camelcase': {
$case_str = 'not case sensitive'
}
'CamelCase': {
$case_str = 'case sensitive'
}
}
$select_str = $select_val ? {
'camelcase' => 'not case sensitive',
'CamelCase' => 'case sensitive',
}
notice "Selectors are ${select_str}."
notice "Case statements are ${case_str}."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment