|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-01 03:05 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ defined() does not return boolean, it returns an integer according to gettype() If you do a gettype() on isset(), it returns the type as boolean. If you do a gettype() on defined() it returns an integer. The docs state defined() returns boolean and it makes logical sense to have defined() return boolean type. Reproduce code: --------------- echo gettype(isset($test)); echo "<br>"; echo gettype(defined("test")); Expected result: ---------------- boolean boolean Actual result: -------------- boolean integer