PHP code example of alexeyyashin / case-converter
1. Go to this page and download the library: Download alexeyyashin/case-converter 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/ */
alexeyyashin / case-converter example snippets
use \AlexeyYashin\CaseConverter\CaseConverter;
$string = ' Strings case converter for PHP';
CaseConverter::toCamelCase($string);
// stringsCaseConverterForPhp
CaseConverter::toPascalCase($string);
// StringsCaseConverterForPhp
CaseConverter::toSnakeCase($string);
// strings_case_converter_for_php
CaseConverter::toScreamingSnakeCase($string);
// STRINGS_CASE_CONVERTER_FOR_PHP
CaseConverter::toCamelSnakeCase($string);
// Strings_Case_Converter_For_Php
CaseConverter::toKebabCase($string);
// strings-case-converter-for-php
CaseConverter::toCobolCase($string);
// STRINGS-CASE-CONVERTER-FOR-PHP
CaseConverter::toTrainCase($string);
// Strings-Case-Converter-For-Php
CaseConverter::toFlatCase($string);
// stringscaseconverterforphp
CaseConverter::toUpperFlatCase($string);
// STRINGSCASECONVERTERFORPHP