I have the following code as my entity:
/**
*
* @Entity
* @Table(name="group")
*
**/
Class Group {
/**
*
* @Column(type="string", nullable=true)
**/
private $phone;
(etc...)
__get( $var ) {
return $this->$var;
}
__set( $var, $val ){
$this->$var = $val;
}
I then try to modify this with a number larger than nine digits. for example,
$group->phone = 5147811326;
$phone is set to 2147483647. The same occurs with 1111111111 (it is conveted to 2147483647)
If I try 514781, it keeps the numbers fine. But over 9 digits it just converts. I originally had the mysql column as an integer but converted it to string…still a problem.
what is happening?!??!!
This means the data type you are using is 32 bits. 2147483647 is equal to 231 − 1.