php / php/doc-en

PHP Data Types

Open
#2,587 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
XML
Stars
596
Forks
890
Avg merge
1d 15h
Merged PRs (30d)
55

Description

From manual page: https://php.net/language.types.intro


Hey there,
it seems to me that there is an issue with the list of expression data types in the documentation introduction on the topic.
The part I am talking about is:

_Every single expression in PHP has one of the following built-in types depending on its value:

  • bool
  • int
  • float (floating-point number)
  • string
  • array
  • object
  • callable
  • resource

To be more specific, there are two things that confused me:

  1. Shouldn't enumeration be named here as well, as it is not the same as an object?
  2. I am uncertain why callable is listed here, as callable is not a data type per se, more of a type declaration (or pseudo type) that different data types like string, array or object (Closure or invokable) can fullfill.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked PHP manual page, language.types.intro, and review the quoted list of expression data types against the current PHP type documentation. Done means the introduction accurately explains whether enumerations belong in the list and how callable should be characterized.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.