PHP code example of norse-blue / prim
1. Go to this page and download the library: Download norse-blue/prim 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/ */
norse-blue / prim example snippets
use NorseBlue\Prim\Scalars\StringObject as Str;
$str = new Str('my string');
echo $str->upper();
// Outputs:
// MY STRING
use NorseBlue\Prim\Facades\Scalar\StringFacade as Str;
echo Str::upper('my string');
// Outputs:
// MY STRING
use NorseBlue\Prim\string;
$str = string('my string');
echo $str->upper();
// Outputs:
// MY STRING
use NorseBlue\Prim\string;
$str = string('THIS IS MY TEXT.')->lower()->ucfirst();
echo $str;
// Outputs:
// This is my text.