PHP code example of mouday / more-echo

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

    

mouday / more-echo example snippets





namespace Mouday\MoreEcho;

/**
 * a demo for php composer
 * Class EchoText
 * @package Mouday\MoreEcho
 */
class EchoText
{
    public static function echoText($text)
    {
        echo $text;
    }
}



Mouday\MoreEcho\EchoText;

EchoText::echoText('Hello World!');
// Hello World!
bash
mkdir more-echo-php

cd more-echo-php

# 初始化项目, 填写好项目的信息
$ composer init
bash
$ tree -I vendor
.
├── README.md
├── composer.json
└── src
    └── EchoText.php

bash
echo '{}' > composer.json