note 129068 added to function.is-numeric

From: Date: Sat, 25 Nov 2023 15:07:53 +0000
Subject: note 129068 added to function.is-numeric
Groups: php.notes 
Request: Send a blank email to php-notes+get-221022@lists.php.net to get a copy of this message
A single leading minus sign or plus sign is accepted as numeric by is_numeric(). So are any number of leading zeros. This is true both before the main numeric part and before the exponent if the value is in exponential notation. Thus all of these values return TRUE from is_numeric(): '+1.23' '-1.23' '01.23' '012' '12E-2' '12E+2' '12E002' '12E+02' '12E-02' ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 136.62.61.13) ---- Manual Page -- https://php.net/manual/en/function.is-numeric.php Edit -- https://main.php.net/note/edit/129068 Del: integrated -- https://main.php.net/note/delete/129068/integrated Del: useless -- https://main.php.net/note/delete/129068/useless Del: bad code -- https://main.php.net/note/delete/129068/bad+code Del: spam -- https://main.php.net/note/delete/129068/spam Del: non-english -- https://main.php.net/note/delete/129068/non-english Del: in docs -- https://main.php.net/note/delete/129068/in+docs Del: other reasons-- https://main.php.net/note/delete/129068 Reject -- https://main.php.net/note/reject/129068 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221022) next »