Doc #77034 [Opn->Nab]: Casting null to int undefined

From: Date: Thu, 18 Oct 2018 20:22:22 +0000
Subject: Doc #77034 [Opn->Nab]: Casting null to int undefined
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16089@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77034&edit=1 ID: 77034 Updated by: salathe@php.net Reported by: casey dot mcginty at gmail dot com Summary: Casting null to int undefined -Status: Open +Status: Not a bug Type: Documentation Problem Package: Variables related PHP Version: 7.2.11 Block user comment: N Private report: N New Comment: See the section "Converting to integer" on the page you linked, particularly under the "From other types" subheading. Previous Comments: ------------------------------------------------------------------------ [2018-10-18 17:44:01] requinix@php.net Are you actually asking that question or just implying you'd like the docs to say it? ------------------------------------------------------------------------ [2018-10-18 17:36:16] casey dot mcginty at gmail dot com Description: ------------ --- From manual page: http://www.php.net/language.types.integer --- I do not see any documentation regarding a null cast to an int. What is the official behavior? Test script: --------------- $myInt = (int)null; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77034&edit=1

« previous php.doc.bugs (#16089) next »