This console [!] program takes as input a file (in.txt) that contains text in random order, process the text and writes the result into an output file (out.txt) as justified text.
Open a console and run the PHP script (justify.php) located in this directory. After that you should enter the input and output file. Example for Windows: C:\"Program Files"\PHP\php.exe D://path_to_file/justify.php
If you are using Linux, file out.txt must have the right to clean and record.