Permalink
Browse files

fix bug #60833 - self, parent, static behave inconsistently case-sens…

…itive
  • Loading branch information...
1 parent 581db9c commit 184db665ebdb6a2717d15e956391f6d88e1d05c6 @smalyshev smalyshev committed Jan 28, 2013
Showing with 143 additions and 99 deletions.
  1. +3 −1 NEWS
  2. +2 −0 UPGRADING
  3. +40 −0 Zend/tests/bug60833.phpt
  4. +98 −98 Zend/zend_compile.c
View
@@ -1,7 +1,9 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 201?, PHP 5.5.0 Beta 1
-
+- Core:
+ . Fixed bug # 60833 (self, parent, static behave inconsistently
+ case-sensitive). (Stas, mario at include-once dot org)
24 Jan 2013, PHP 5.5.0 Alpha 4
View
@@ -24,6 +24,8 @@ PHP 5.5 UPGRADE NOTES
- Drop Windows XP and 2003 support. (Pierre)
- All internal case insensitivity handling for class, function and constant
names is done according to ASCII rules, current locale settings are ignored.
+- self, parent & static keywords now are always case-insensitive (see bug
+ #60833).
- php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
zend_logo_guid() have been removed
- Removal of Logo GUIDs
@@ -0,0 +1,40 @@
+--TEST--
+Bug #60833 (self, parent, static behave inconsistently case-sensitive)
+--FILE--
+<?php
+class A {
+ static $x = "A";
+ function testit() {
+ $this->v1 = new sELF;
+ $this->v2 = new SELF;
+ }
+}
+
+class B extends A {
+ static $x = "B";
+ function testit() {
+ PARENT::testit();
+ $this->v3 = new sELF;
+ $this->v4 = new PARENT;
+ $this->v4 = STATIC::$x;
+ }
+}
+$t = new B();
+$t->testit();
+var_dump($t);
+?>
+--EXPECTF--
+object(B)#%d (4) {
+ ["v1"]=>
+ object(A)#%d (0) {
+ }
+ ["v2"]=>
+ object(A)#%d (0) {
+ }
+ ["v3"]=>
+ object(B)#%d (0) {
+ }
+ ["v4"]=>
+ string(1) "B"
+}
+
Oops, something went wrong.

2 comments on commit 184db66

@laruence
Member

it will be better, if you split bug fix and ws fix into two individually commits..

@smalyshev
Contributor

Sorry, I use eclipse which does this thing automatically. Sometimes I forget about that fact. You can use ?w=1 on github to filter it.

Please sign in to comment.