Snippets tagged “type-casting”
6 snippets use this tag.
- Converting double to integer in JavaJava
To convert a double to an int in Java, you can use the intValue() method of the Double class.
- How to Convert a PHP Object to an Associative ArrayPHP
If you want to get a proper explanation of how to convert a PHP object to an associative array, you are in the right place. Just follow the examples.
- How to Convert a String to a Number in PHPPHP
This snippet is dedicated to one of the common PHP issues: how to convert a string to a number. You can easily do that by following the options we provide.
- How to Convert DateTime to String in PHPPHP
If you wish to manipulate with the DateTime object in PHP, then this snippet is for you. Here, you will learn how to correctly convert DateTime to string.
- How to fix Warning Illegal string offset in PHPPHP
The "Illegal string offset" warning in PHP occurs when you try to access an offset of a string variable as if it were an array.
- What is the PHP Equivalent of .NET/Java's toString()?PHP
Here is a short tutorial representing to you the most accurate PHP equivalent of .Net/Java’s to string. Read it carefully and check out the examples.