Canary is a cleaner version of the PHP language, for a faster development.
Warning: The current version is highly unstable, and is under development by SaguiTech's team. Don't use it for production.
- Code without annoying semicolons;
- and the $ preceding variables.
You can be cloning this repository and build a PHP Archive (PHAR) using the box-project
$ git clone https://github.com/SaguiTech/Canary.git
$ composer update
$ php vendor/bin/box build
$ chmod +x canary.phar
$ mv canary.phar /usr/local/bin/canary
Check the installation:
$ canary --version
file.cap
echo "hello!\n"
variableWithNumbers10 = 10
VariableA = 'yes'
varB = 'no'
if (VariableA == varB)
echo 'yes!'
else
echo 'no!'
Then run:
$ canary run file.cap
The output is (file.php):
<?php
echo "hello!\n";
$variableWithNumbers10 = 10;
$VariableA = 'yes';
$varB = 'no';
if ($VariableA == $varB)
echo 'yes!';
else
echo 'no!';
$ canary run -h
$ php vendor/bin/phpunit --bootstrap vendor/autoload.php tests/
This code is not tested with many cases. It's under development.
- Implement unit tests;
- Lexical analysis.