https://github.com/dcblogdev/reservedwords
An array of reserved words for PHP
https://github.com/dcblogdev/reservedwords
Last synced: 4 months ago
JSON representation
An array of reserved words for PHP
- Host: GitHub
- URL: https://github.com/dcblogdev/reservedwords
- Owner: dcblogdev
- Created: 2015-11-28T15:09:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-28T15:12:50.000Z (about 10 years ago)
- Last Synced: 2025-02-04T01:33:29.818Z (about 1 year ago)
- Language: PHP
- Size: 1000 Bytes
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reserved words class
This class contains an array of reserved words for PHP including PHP 7. This can be used to make sure reserved words are not used.
##Install
include the class, add a namespace to use composer autoloading or include manually.
##Usage
````
include('ReservedWords.php');
$name = 'list';
if(in_array($name, ReservedWords::getList())){
exit("Name cannot be a reserved word\n");
}
````