php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67149 Every array index of a NULL value exists
Submitted: 2014-04-28 21:10 UTC Modified: 2014-04-28 21:28 UTC
From: lezso69 at gmail dot com Assigned:
Status: Duplicate Package: Arrays related
PHP Version: 5.5.11 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lezso69 at gmail dot com
New email:
PHP Version: OS:

 

 [2014-04-28 21:10 UTC] lezso69 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.types.null
---

When I assign a NULL value to a variable, and access it as an array, I got no warning.

Test script:
---------------
<?php
$notarray = null;
var_dump($notarray[0]);

Expected result:
----------------
Some warning should be shown.

Actual result:
--------------
Just returns NULL.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-28 21:28 UTC] requinix@php.net
-Status: Open +Status: Duplicate -Type: Bug +Type: Feature/Change Request
 [2014-04-28 21:28 UTC] requinix@php.net
See bug #62769.
 [2014-04-28 21:28 UTC] requinix@php.net
-Type: Feature/Change Request +Type: Bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 19:01:32 2024 UTC