The PHP Case Converter collection helps changing the cases of existing texts.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings
src
.buildpath
.project
LICENSE
README.md

README.md

PHP Case Converter

The PHP Case Converter collection helps changing the cases of existing texts.

Usage

<?php
require_once("CaseConverter.php");
$converter = new CaseConverter();

$input = "The quick brown fox jumps over the lazy dog";

$converter->convertToUpperCase($input);   // THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
$converter->convertToLowerCase($input);   // the quick brown fox jumps over the lazy dog
$converter->convertToStartCase($input);   // The Quick Brown Fox Jumps Over The Lazy Dog
$converter->convertToCamelCase($input);   // TheQuickBrownFoxJumpsOverTheLazyDog
$converter->convertToSnakeCase($input);   // The_Quick_Brown_Fox_Jumps_Over_The_Lazy_Dog
$converter->convertToKebabCase($input);   // the-quick-brown-fox-jumps-over-the-lazy-dog
$converter->convertToStudlyCaps($input);  // THe QUiCk BRoWn FoX JUMps oVeR thE LazY dOG
$converter->invertCase($input);           // tHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

Online Resources

Get more information and online tools for this implementation on https://en.toolpage.org/cat/case-converter