ID: 12703
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Class/Object related
Operating System: Linux
PHP Version: 4.0.6
New Comment:

Works for me fine with PHP 4.1.0RC1:

<?php

class X
{
   function X() { }
}

class A extends X
{
   function A() { X::X(); }
   function crash_me() {
     echo "CRASHME A<br>\n"; 
   }
}

class B extends A
{
   function B() { A::A(); }

   function crash_me() { 
     echo "CRASHME B<br>\n";
     parent::crash_me();
   }
}

class C extends B
{
   function C() { B::B(); }
}

$r = new C();
$r->crash_me();

?>


Previous Comments:
------------------------------------------------------------------------

[2001-08-11 19:24:00] [EMAIL PROTECTED]

On Linux this has the same behaviour even if you replace
$this-> reference by parent:: or A::, B:: references:

class A extends X
{
      function A() { X::X(); }

      function crash_me() { echo "CRASHME A<br>\n"; }
}

class B extends A
{
      function B() { A::A(); }
  
      function crash_me() { echo "CRASHME B<br>\n"; parent::crash_me(); }
}

class C extends B
{
      function C() { B::B(); }
}

$r = new C();
$r->crash_me();


echoes lots of CRASHME B ... but not any CRASHME A ...

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=12703&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to