variable-types

Variable Types

I know that I can do something like $int = (int)99; //(int) has a maximum or 99 To set the variable $int to an integer and give it a value of 99, Is there a way to set the type to something like LongBlob in MySQL for LARGE Integers in PHP? ...

C#, int or Int32? Should I care?

From my understanding int and Int32 are the same thing in C#, but I've read a number of times that int is preferred over Int32 but without any reason given. So, what is the reason? Should I care? ...

Declaring Variable Types in PHP?

I was trying to get my Netbeans to autocomplete with PHP, and I learned that this code is valid in PHP: function blah(Bur $bur) {} A couple of questions: Does this actually impose any limits on what type of variable I can pass to the blah method? If this is just to help the IDE, that's fine with me. How can I declare the type of a v...

How can I force Java to accept a conditional type for one of the parameters of a method call?

This question is hard to phrase, so I'm going to have to use some code samples. Basically, I have an (overloaded) method that takes 3 parameters, the last of which I overloaded. As in, sometimes the last parameter is a String, sometimes it's a double, etc. I want to call this method using a ternary conditional expression as the last para...

Unify variable types of array elements

After hours of debugging, I found an error in one of my scripts. For saving different event types in a database, I have an array of unique data for each event that can be used to identify the event. So I basically have some code like $key = md5(json_encode($data)); to generate a unique key for each event. Now, in some cases, a value...