Annotation of embedaddon/php/Zend/tests/bug34260.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #34260 (Segfault with callbacks (array_map) + overloading)
                      3: --FILE--
                      4: <?php
                      5: class Faulty
                      6: {
                      7:     function __call($Method,$Args)
                      8:     {
                      9:         switch($Method)
                     10:         {
                     11:             case 'seg':
                     12:               echo "I hate me\n";
                     13:             break;
                     14:         }
                     15:     }
                     16: 
                     17:     function NormalMethod($Args)
                     18:     {
                     19:        echo "I heart me\n"; 
                     20:     }
                     21: }
                     22: 
                     23: $Faulty = new Faulty();
                     24: $Array = array('Some junk','Some other junk');
                     25: 
                     26: // This causes a seg fault.
                     27: $Failure = array_map(array($Faulty,'seg'),$Array);
                     28: 
                     29: // This does not.
                     30: $Failure = array_map(array($Faulty,'NormalMethod'),$Array);
                     31: ?>
                     32: --EXPECT--
                     33: I hate me
                     34: I hate me
                     35: I heart me
                     36: I heart me

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>