<p>I know that I can do something like</p>

<pre><code>$int = (int)99; //(int) has a maximum or 99
</code></pre>

<p>To set the variable <code>$int</code> to an integer and give it a value of <code>99</code>. </p>

<p>Is there a way to set the type to something like <code>LongBlob</code> in MySQL for <code>LARGE</code> Integers in PHP?</p>

[{'answer_id': 43295, 'author': 'erlando', 'author_id': 4192, 'author_profile': 'https://Stackoverflow.com/users/4192', 'pm_score': 4, 'selected': True, 'text': '<p>No. PHP does what is called automatic type conversion.</p>\n\n<p>In your example</p>\n\n<pre><code>$int = (int)123;\n</code></pre>\n\n<p>the "(int)" just assures that at that exact moment 123 will be handled as an int.</p>\n\n<p>I think your best bet would be to use a class to provide some sort of type safety.</p>\n'}, {'answer_id': 43308, 'author': 'ejack', 'author_id': 1377, 'author_profile': 'https://Stackoverflow.com/users/1377', 'pm_score': 0, 'selected': False, 'text': '<p>No, the type LongBlob is specific to MySQL. In PHP it is seen as binary data (usually characters), if you tried to convert it to an int it would take the first 32 bits of data (platform dependent) and push that into the variable.</p>\n'}]
['https://Stackoverflow.com/questions/43291', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/115/']