File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug61165.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:36 2012 UTC (12 years, 10 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

    1: --TEST--
    2: Bug #61165 (Segfault - strip_tags())
    3: --FILE--
    4: <?php
    5: 
    6: $handler = NULL;
    7: class T {
    8:     public $_this;
    9: 
   10:     public function __toString() {
   11: 		global $handler;
   12: 	    $handler = $this;
   13:         $this->_this = $this; // <-- uncoment this
   14:         return 'A';
   15:     }
   16: }
   17: 
   18: $t = new T;
   19: for ($i = 0; $i < 3; $i++) {
   20:     strip_tags($t);
   21: 	strip_tags(new T);
   22: }
   23: var_dump($handler);
   24: --EXPECTF--
   25: object(T)#%d (1) {
   26:   ["_this"]=>
   27:   *RECURSION*
   28: }

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