Do you wish to register an account?
A rawmode CLI editor, in PHP, based on the C Kilo tutorial: https://viewsourcecode.org/snaptoken/kilo/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Timothy Warren ff6b5f616a Merge branch 'master' of git.timshomepage.net:timw4mail/php-kilo 3 weeks ago
src Fix CTRL method 3 weeks ago
tests Fix CTRL method 3 weeks ago
.editorconfig Add editorconfig 4 months ago
.gitignore Fix CTRL method 3 weeks ago
Dockerfile Move phpdbg install to Dockerfile 2 months ago
Jenkinsfile Attempt to enable ffi for code coverage 2 months ago
README.md Refactor and simplify 3 weeks ago
composer.json Add json dependency for tests 3 months ago
composer.lock Fix lockfile 3 weeks ago
kilo Fix CTRL method 3 weeks ago
phpunit.xml Tests for every class 3 months ago
test.php Fix syntax highlighting dissapearing when code pushed to new line (for PHP) 3 months ago

README.md

PHP Kilo

Build Status

A reimplementation of the Kilo tutorial in PHP. Requires PHP 7.4, due to requiring the FFI extension.

Implementation notes:

  • The editor prefix has been removed from all the relevant functions, instead they are methods on the Editor class.
  • Enums are faked with class constants
  • Composer is used for autoloading
  • Properties that must be manually updated in the C version (like counts/string length) are implemented with magic methods, so they are essentially calculated on read.
  • Generally, if a function exists in PHP, with the same name as the C function, the PHP version will be used.