#40714 [NEW]: 'false instanceof string;' gives fun times.... NOT

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40714 [NEW]: 'false instanceof string;' gives fun times.... NOT

    From: [email]pookey@php.net[/email]
    Operating system: linux
    PHP version: 5.2.1
    PHP Bug Type: Scripting Engine problem
    Bug description: 'false instanceof string;' gives fun times.... NOT

    Description:
    ------------
    # php -r 'false instanceof string;'

    Fatal error: Invalid opcode 138/1/1. in Command line code on line 1


    Not a great deal more to say about this bug, other than accept it's
    stupid code anyway.


    Reproduce code:
    ---------------
    # php -r 'false instanceof string;'

    Expected result:
    ----------------
    no output

    Actual result:
    --------------
    Fatal error: Invalid opcode 138/1/1. in Command line code on line 1

    --
    Edit bug report at [url]http://bugs.php.net/?id=40714&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40714&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40714&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40714&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40714&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40714&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40714&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40714&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40714&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40714&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40714&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40714&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40714&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40714&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40714&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40714&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40714&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40714&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40714&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40714&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40714&r=mysqlcfg[/url]
    pookey@php.net Guest

  2. Similar Questions and Discussions

    1. #40714 [Fbk->Opn]: 'false instanceof string;' gives fun times.... NOT
      ID: 40714 User updated by: pookey@php.net Reported By: pookey@php.net -Status: Feedback +Status: Open...
    2. #40714 [Opn->Fbk]: 'false instanceof string;' gives fun times.... NOT
      ID: 40714 Updated by: iliaa@php.net Reported By: pookey@php.net -Status: Open +Status: Feedback Bug...
    3. #40714 [Com]: 'false instanceof string;' gives fun times.... NOT
      ID: 40714 Comment by: judas dot iscariote at gmail dot com Reported By: pookey@php.net Status: Open Bug Type: ...
    4. #25734 [NEW]: string false type-casts into boolean TRUE
      From: rbotzer at yahoo dot com Operating system: MacOS X PHP version: 4.3.3 PHP Bug Type: Feature/Change Request Bug...
    5. #25140 [Opn->Csd]: mb_convert_encoding returns FALSE when it tries to convert empty string ('')
      ID: 25140 Updated by: derick@php.net Reported By: hyamamoto at cybozu dot co dot jp -Status: Open +Status: ...
  3. #2

    Default #40714 [Opn->Csd]: 'false instanceof string;' gives fun times.... NOT

    ID: 40714
    Updated by: [email]iliaa@php.net[/email]
    Reported By: [email]pookey@php.net[/email]
    -Status: Open
    +Status: Closed
    Bug Type: Scripting Engine problem
    Operating System: linux
    PHP Version: 5.2.1
    New Comment:

    This bug has been fixed in CVS.

    Snapshots of the sources are packaged every three hours; this change
    will be in the next snapshot. You can grab the snapshot at
    [url]http://snaps.php.net/[/url].

    Thank you for the report, and for helping us make PHP better.




    Previous Comments:
    ------------------------------------------------------------------------

    [2007-03-04 04:24:25] [email]pookey@php.net[/email]

    it may never have been intended to work, however the error really
    should be a little ...ermm.. better...

    I can't be bothered to download and compile a CVS snapshot, so if
    someone else wants to test feel free, else close the bug, I'm not
    really that bothered about this oddity :)

    ------------------------------------------------------------------------

    [2007-03-04 04:11:13] [email]iliaa@php.net[/email]

    Please try using this CVS snapshot:

    [url]http://snaps.php.net/php5.2-latest.tar.gz[/url]

    For Windows:

    [url]http://snaps.php.net/win32/php5.2-win32-latest.zip[/url]

    The instance of operator was never intended to work with literals, the

    "parameter" must always be a variable.

    ------------------------------------------------------------------------

    [2007-03-04 04:08:19] judas dot iscariote at gmail dot com

    huh ? I get

    ../sapi/cli/php -r 'false instanceof string;'
    PHP Fatal error: instanceof expects an object instance, constant given
    in Command line code on line 1

    ------------------------------------------------------------------------

    [2007-03-04 04:00:17] [email]pookey@php.net[/email]

    Description:
    ------------
    # php -r 'false instanceof string;'

    Fatal error: Invalid opcode 138/1/1. in Command line code on line 1


    Not a great deal more to say about this bug, other than accept it's
    stupid code anyway.


    Reproduce code:
    ---------------
    # php -r 'false instanceof string;'

    Expected result:
    ----------------
    no output

    Actual result:
    --------------
    Fatal error: Invalid opcode 138/1/1. in Command line code on line 1


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40714&edit=1[/url]
    iliaa@php.net Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139