Get the latest tech news

The case against static typing in PHP (2023)


The case against static typing in PHP

Later improvements in CPU speeds reduced the differences in performance to insignificant levels, and this gave rise to interpreted languages which, because there was no compilation phase, meant that any type checking had to be delayed until run time. Note also that unlike virtually every other programmer on the planet I do not have a separate class variable for each table column as I have found it far easier to leave the$_POST array intact on its journey from the HTML form to the database. For the new scalar type declarations introduced in PHP 7.0 an explicit choice was made to not accept null values to non-nullable arguments, but changing the existing behavior of internal functions would have been too disruptive at the time.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Case

Case

Photo of php

php

Photo of static typing

static typing

Related news:

News photo

PHP Docker image just hit 1B pulls on Docker Hub

News photo

The case against Google's claims of "quantum supremacy"

News photo

Dismantling ELT: The Case for Graphs, Not Silos