Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

209
Visualizações
PHP 7.4 laravel data saves garbage value

We are noticing a weird issue in Laravel 8 with PHP 7.4 version.

When we save data to the Mysql db, it is storing garbage value.

An example data:

$product = Product::create([
    'product_id' => 6791044858042,
    'inventory_id' => 42309695242426
]); 

The same is happening using $product = new Product();

The value in the DB is

"product_id":"701563066","inventory_id":"-27590470"

When we log the $product in the file just after saving, it has the correct value. The data is not re-saved and the data modified is notified either.

Inspected the max integer value for the column in db schema. It has bigint(20), I did change it to biging(100) and even varchar(255), yet it is the same result.

Further the garbage value is random and not a fixed value.

I had changed it back to 7.3 in the server and it seems fine.

Any one has faced the issue before?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda