PHP code example of opintat / caseconverter

1. Go to this page and download the library: Download opintat/caseconverter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

opintat / caseconverter example snippets

javascript
// Load Composer's autoloader  

$converter = new Converter();

$snake = $converter->setFrom('SnakeCase')->toSnakeCase();
echo $snake; // => snake_case

$camel = $converter->setFrom('camel-case')->toCamelCase();
echo $camel; // => camelCase

$kebap = $converter->setFrom('kebapCase')->toKebapCase();
echo $kebap; // => kebap-case

$pascal = $converter->setFrom('pascal_case')->to'PascalCase();
echo $pascal; // => PascalCase