|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-15 19:12 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 08:00:01 2025 UTC |
Description: ------------ 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: <?php $blah = new Java( "Blah" ); switch ( $blah->blah ) { case 1: break; } ?> Expected result: ---------------- Exits normally. Actual result: -------------- A core dump. If you replace $blah->blah with $blah->getBlah() the code will work correctly.