PHP code example of rexxars / morse
1. Go to this page and download the library: Download rexxars/morse 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/ */
rexxars / morse example snippets
php
// Translate from/to morse:
$text = new Morse\Text();
$morse = $text->toMorse('SOS');
echo $morse; // ... --- ...
echo $text->fromMorse($morse); // SOS
// Generate a WAV-file:
$wav = new Morse\Wav();
file_put_contents('sos.wav', $wav->generate('SOS'));