ph-7 / datatype
List of the available PHP data types, nicely stored into readable constant names
Installs: 3 289
Dependents: 2
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.3.0
Requires (Dev)
- phpunit/phpunit: ^9.5
README
Get all valid PHP type names with constants ✅
📄 Overview
Simple library containing the list of constants for the available PHP data types. Use those constant types in your project when you need to mention a data type, use those constants instead of hardcoding them.
⚙️ Requirements
- PHP 7.3 or newer.
⚙️ Installation
Install it easily with Composer
composer require ph-7/datatype
🤠 Example
require_once __DIR__ . '/vendor/autoload.php'; use PH7\Datatype\Type; $id = settype($_GET['id'], Type::STRING); $name = settype($inputName, Type::STRING);
😋 Who cooked it?
Pierre-Henry Soria, a highly passionate, zen & pragmatic software engineer 😊
📺 The Video
👉 Watch on YouTube 👈
⚖️ License
PHP type names is generously distributed under the MIT.