Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101273 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90106 invoked from network); 9 Dec 2017 06:29:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2017 06:29:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=andreas@dqxtech.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=andreas@dqxtech.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain dqxtech.net from 209.85.215.41 cause and error) X-PHP-List-Original-Sender: andreas@dqxtech.net X-Host-Fingerprint: 209.85.215.41 mail-lf0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:43742] helo=mail-lf0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/72-62356-3B28B2A5 for ; Sat, 09 Dec 2017 01:29:09 -0500 Received: by mail-lf0-f41.google.com with SMTP id 94so13963236lfy.10 for ; Fri, 08 Dec 2017 22:29:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dqxtech-net.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=BE4RNX66WnnQCxW/uQTrVpJ3VncUwonLcoL6zsyrSfo=; b=lHjZJgODcofXVSKU1gQ61MgG7OrWKW63mY0OOPdffU5s59UGknrNCLX9xwd6ScdsV/ Q9tFu+sgoRmi2wr2njD7gJXN7G950Im4JfuEMdk6ujwXlK6oejaCROwRtvTuf5uTHTii JJScD/Ta6gdEgWsSpGuzroRgzObFd3Cd/B+r55C/nEQFV658Gehow04aOpNFH13+D0OS 6k9TBRdgJZKC78JwQs6eA6ddTtBsd4GxbaaQJ2QwmvgxOJeZfX4TCvs2pGasMnr/y/3j BwpPW5OMXuR7/Do/q3cKMIQZWg3kicgP37ZRe2xE85XOxooY+72Jk+62fX9u6Pk2G3mo YlAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BE4RNX66WnnQCxW/uQTrVpJ3VncUwonLcoL6zsyrSfo=; b=PpPoCzRR5KoQVT0QjLnh/sWgPHz6IKiyY2CbLEFfgun487fid6E4BmF2MxjVJgMMlm xMLg9LiemN2K/TbZECsVgdkQsCtWuOKMNAp16WlDUjfP7Fjgwi9/d8kJ3GcsTpSYwVy3 vaDKamji4I9/7thgo8D+gPe1Or+flDrj+1sVDRgIZCiuN6751E82ax0zpeDy18wjLGl8 n3tJzWqDEeqHuenjFkkJlswgcvvDqLN6mggNLhRLxCJyBA91RuKfPNbX+x8UumqnWDnN W/8wk8yIHVMzwiA6/6+7phQE2ic9srvYoo0LZDJLOFIefxXEFdIuvuekZzbnpwFVxaUi Bljw== X-Gm-Message-State: AJaThX6MtBodfMeCajmo4CsXapxf6B15KnNp7tpBhv1cZOdObiKBxjWC dZfHyiT1e9FB7Kbtz8H1kcl7Nqe/ X-Google-Smtp-Source: AGs4zMZ8oITTeUWAcs6nwKeZyBxNhpblNT8/ZNf6LMKC/grFs4ZMD2EnKHm2dHSiLfMQRSWfsaR8bw== X-Received: by 10.25.178.139 with SMTP id t11mr14053098lfk.13.1512800944338; Fri, 08 Dec 2017 22:29:04 -0800 (PST) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com. [209.85.215.44]) by smtp.googlemail.com with ESMTPSA id i21sm1723322lfk.74.2017.12.08.22.29.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Dec 2017 22:29:03 -0800 (PST) Received: by mail-lf0-f44.google.com with SMTP id x20so14009216lff.1 for ; Fri, 08 Dec 2017 22:29:02 -0800 (PST) X-Received: by 10.46.101.74 with SMTP id z71mr17919101ljb.35.1512800942649; Fri, 08 Dec 2017 22:29:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.170.16 with HTTP; Fri, 8 Dec 2017 22:28:41 -0800 (PST) Date: Sat, 9 Dec 2017 07:28:41 +0100 X-Gmail-Original-Message-ID: Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="001a114ab1bccd757f055fe26a37" Subject: instanceof survives non-object variables, but crashes on non-object constants. From: andreas@dqxtech.net (Andreas Hennings) --001a114ab1bccd757f055fe26a37 Content-Type: text/plain; charset="UTF-8" The following (https://3v4l.org/A2Tp6) is ok, it simply returns false: $x = 1; $x instanceof \stdClass; The following (https://3v4l.org/IdSBu) gives a fatal error: 1 instanceof \stdclass; t think this behavior is inconsistent, and we should consider changing it. There are two options, but only one is BC. - Let 1 instanceof \stdClass return false, instead of crashing. -> seems BC - Let $x instanceof \stdClass crash, if $x is not an object. -> BC break. So it seems the first would the option we should take. This is also what hhvm does, according to https://3v4l.org/IdSBu. --001a114ab1bccd757f055fe26a37--