Skip to content

PHP code snippet – How convert the string to int in laravel function event?

$num = "3.14";
$int = (int)$num;
$float = (float)$num;
See also  Python code snippet - How to check if element is in list ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.