File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / strings / bug22592.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 4 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, v5_3_10, HEAD
php

    1: --TEST--
    2: Bug #22592 (Cascading assignments to strings with curly braces broken)
    3: --FILE--
    4: <?php
    5: $wrong = $correct = 'abcdef';
    6: 
    7: $t = $x[] = 'x';
    8: 
    9: var_dump($correct);
   10: var_dump($wrong);
   11: 
   12: $correct[1] = '*';
   13: $correct[3] = '*';
   14: $correct[5] = '*';
   15: 
   16: // This produces the 
   17: $wrong[1] = $wrong[3] = $wrong[5] = '*';
   18: 
   19: var_dump($correct);
   20: var_dump($wrong);
   21: 
   22: ?>
   23: --EXPECT--
   24: string(6) "abcdef"
   25: string(6) "abcdef"
   26: string(6) "a*c*e*"
   27: string(6) "a*c*e*"

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