|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28013 using java get*() in a switch statement
Submitted: 2004-04-15 17:35 UTC Modified: 2004-04-15 19:12 UTC
From: pcarmody at c-spanarchives dot org Assigned:
Status: Not a bug Package: Java related
PHP Version: 4.3.4 OS: Solaris 8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: pcarmody at c-spanarchives dot org
New email:
PHP Version: OS:


 [2004-04-15 17:35 UTC] pcarmody at c-spanarchives dot org
When using the auto-JavaBean style access to member variables in a switch statement causes a core dump.  Specifying the method name directly avoids this problem.

Reproduce code:
Java class:
public class Blah {
  private int blah;
  public Blah() {
    this.blah = 1;
  public int getBlah() {
    return this.blah;

PHP call:
$blah = new Java( "Blah" );
switch ( $blah->blah ) {
  case 1:

Expected result:
Exits normally.

Actual result:
A core dump.

If you replace $blah->blah with $blah->getBlah() the code will work correctly.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-15 19:12 UTC]
See the other Java related bugs. (This extension is not supported anymore)

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 23:03:39 2023 UTC