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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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