Categories: Software Development

Existing PHP catches and bugs

I will keep updating this post as part of note whenever I find another catch and bug in PHP. I hope it can help beginner PHP developers (like me) out there to escape hours of confusion and stress .. ?

PUT multipart/data bug

As explained by this open bug (since 2011), when you submit a multipart/data PUT request (usually for uploading file), you will not receive the data as usual in PHP. The best workaround so far, is to send the multipart/data request as POST and to add additional field _method with PUT value. You will also experience this bug in all well-known PHP frameworks.

Dots and spaces in request variable names are replaced by underscore

Yes, you heard it right. By default, PHP will convert all dots and spaces in request variable names to underscore. So, if you send variable named product.id in your request, you will only find product_id in your PHP code. Thrilling isn’t it? ?

0 0 votes
Article Rating
yohanes.gultom@gmail.com

Share
Published by
yohanes.gultom@gmail.com
Tags: php

Recent Posts

Get Unverified SSL Certificate Expiry Date with Python

Getting verified SSL information with Python (3.x) is very easy. Code examples for it are…

3 years ago

Spring Data Couchbase 4 Multibuckets in Spring Boot 2

By default, Spring Data Couchbase implements single-bucket configuration. In this default implementation, all POJO (Plain…

3 years ago

Firebase Auth Emulator with Python

Last year, Google released Firebase Auth Emulator as a new component in Firebase Emulator. In…

3 years ago

Google OIDC token generation/validation

One of the authentication protocol that is supported by most of Google Cloud services is…

4 years ago

Fast geolocation query with PostGIS

If you need to to add a spatial information querying in your application, PostGIS is…

4 years ago

Auto speech-to-text (Indonesian) with AWS Transcribe and Python

Amazon Web Service Transcribe provides API to automatically convert an audio speech file (mp3/wav) into…

4 years ago