-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add is_numeric() function to check if variable is numeric #1861
Comments
this should not be a function. It should be a test if you want to add it (making it look like However, what is the use case for having it. I'm not sure it belongs to the core |
A test would be great indeed. Didn't thought about that. A use case... |
( @bertoost you can check here (for a sample implementation) https://github.com/GeckoPackages/Twig , disclaimer I wrote it) |
Closing as it won't be added in Twig core, Adding it in an extension is easy enough though. |
You can find an implementation here: https://stackoverflow.com/a/52946699/2257664 |
Title says enough I guess ;-)
Currently using this simple registered function
The text was updated successfully, but these errors were encountered: