PHP code example of johnnymast / morsecode

1. Go to this page and download the library: Download johnnymast/morsecode 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/ */

    

johnnymast / morsecode example snippets


use johnnymast\Morsecode\Morsecode;

$morse = new Morsecode();
echo $morse->encode('This is a test');

use johnnymast\Morsecode\Morsecode;

$morse = new Morsecode();
echo $morse->decode('- .... .. ... / .. ... / .- / - . ... -');

use johnnymast\Morsecode\Morsecode;

$morse = new Morsecode('This is a test');
echo $morse->encode();