라라벨 bcrypt()

$password = bcrypt('my-secret-password');

라라벨 camel_case()

echo camel_case('foo_bar');
echo camel_case('foo bar');
echo camel_case('Foo Bar');
echo camel_case('FooBar');
echo camel_case('fooBar');
# fooBar

echo camel_case('Foobar');
# foobar

echo camel_case('FOOBAR');
# fOOBAR

라라벨 snake_case()

$samples = ['foo_bar', 'Foo Bar', 'FooBar', 'fooBar', 'Foobar', 'foo bar', 'FOOBAR'];
foreach( $samples as $sample ) {
	echo $sample." → ".snake_case($sample) . PHP_EOL;
}
# foo_bar → foo_bar
# Foo Bar → foo_bar
# FooBar → foo_bar
# fooBar → foo_bar
# Foobar → foobar
# foo bar → foobar
# FOOBAR → f_o_o_b_a_r

라라벨 studly_case()

$samples = array('foo_bar', 'Foo Bar', 'FooBar', 'fooBar', 'Foobar', 'foo bar', 'FOOBAR');
foreach( $samples as $sample ) {
	echo $sample." → ".studly_case($sample) . PHP_EOL;
}
# foo_bar → FooBar
# foo bar → FooBar
# Foo Bar → FooBar
# FooBar → FooBar
# fooBar → FooBar
# Foobar → Foobar
# FOOBAR → FOOBAR