As requested, here is the justification for the additional keywords:
1. PHP7 added new [standard exception 
types](http://php.net/manual/en/reserved.exceptions.php) (classes). New `Error` 
objects can also be thrown for non-fatal errors. The geany keyword list already 
included the old standard `Exception` so it makes sense to also include the 
new, specialized exceptions and errors (ie. `ArgumentCountError`, 
`ArithmeticError`, `ErrorException`, etc.)
2. `assert` is now a [language 
construct](http://php.net/manual/en/function.assert.php) in PHP7. Language 
constructs like `isset`, `array`, and `unset` were already included in the 
geany PHP keywords list so it makes sense to add this new one.
3. Some [magic methods](http://php.net/manual/en/language.oop5.magic.php) like 
`__sleep` and `__wakeup` were already included in the PHP keywords list, but 
the other magic methods like `__construct`, `__call`, etc. were missing. All 
magic methods should be included for consistency.
4. PHP7 adds new [interfaces](http://php.net/manual/en/reserved.interfaces.php) 
and makes better use of old ones. They can be implemented in user classes or 
used for function argument type hinting: `callable`, `traversable`, `closure`, 
`iterable` (PHP 7.1), etc.
5. When running PHP in CLI mode, appropriate 
[streams](http://php.net/manual/en/features.commandline.io-streams.php) are 
automatically bound to the constants `STDIN`, `STDOUT`, and `STDERR`. Other 
fundamental constants like `TRUE`/`FALSE` were already in the keyword list. I 
suggest including the stdio streams too.
6. `void` is a [new return 
type](http://php.net/manual/en/migration71.new-features.php) in PHP 7.1.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1547#issuecomment-316415038

Reply via email to