php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40714 'false instanceof string;' gives fun times.... NOT
Submitted: 2007-03-04 04:00 UTC Modified: 2007-03-04 16:10 UTC
From: pookey@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.2.1 OS: linux
Private report: No CVE-ID: None
 [2007-03-04 04:00 UTC] pookey@php.net
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-04 04:08 UTC] 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:11 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

The instance of operator was never intended to work with literals, the 
"parameter" must always be a variable.
 [2007-03-04 04:24 UTC] pookey@php.net
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 16:10 UTC] iliaa@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC