php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #41261 instanceof syntax signature (other operators too)
Submitted: 2007-05-02 15:46 UTC Modified: 2007-08-17 09:07 UTC
From: rares dot marian at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
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: rares dot marian at gmail dot com
New email:
PHP Version: OS:

 

 [2007-05-02 15:46 UTC] rares dot marian at gmail dot com
Description:
------------
The instanceof operator documentation does not simply state whether $a in the phrase "$a instanceof $b" can be a string. It is stated that $b can be string however.

In fact none of the operators have any syntax documentation. I'd be glad to contribute by documenting the operators.

It would be something along the lines of: object instanceof mixed.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-17 09:07 UTC] vrana@php.net
"instanceof is used to determine whether a PHP variable is an instantiated object of a certain class". So $a must be variable.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Nov 20 08:00:01 2025 UTC