|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 - 26 = ?
Subscribe to this entry?

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 08:01:28 2024 UTC