note 126060 added to language.operators.type
| From: | wapinet.mail.ru via php-notes | Date: | Fri, 07 May 2021 23:57:03 +0000 |
| Subject: | note 126060 added to language.operators.type | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216356@lists.php.net to get a copy of this message | ||
if you have only class names (not objects) you can use that snippet: https://3v4l.org/mUKUC
<?php
interface i{}
class a implements i{}
var_dump(a::class instanceof i); // false
var_dump(in_array(i::class, class_implements(a::class), true)); // true
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 37.214.46.78)
----
Manual Page -- https://php.net/manual/en/language.operators.type.php
Edit -- https://main.php.net/note/edit/126060
Del: integrated -- https://main.php.net/note/delete/126060/integrated
Del: useless -- https://main.php.net/note/delete/126060/useless
Del: bad code -- https://main.php.net/note/delete/126060/bad+code
Del: spam -- https://main.php.net/note/delete/126060/spam
Del: non-english -- https://main.php.net/note/delete/126060/non-english
Del: in docs -- https://main.php.net/note/delete/126060/in+docs
Del: other reasons-- https://main.php.net/note/delete/126060
Reject -- https://main.php.net/note/reject/126060
Search -- https://main.php.net/manage/user-notes.php