#49165 [NEW]: return does not return data

From: Date: Wed, 05 Aug 2009 04:06:44 +0000
Subject: #49165 [NEW]: return does not return data
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140665@lists.php.net to get a copy of this message
From: makapoh at bk dot ru Operating system: ubuntu linux x64 PHP version: 5.2.10 PHP Bug Type: Unknown/Other Function Bug description: return does not return data Description: ------------ function not always return data Reproduce code: --------------- class a { function a1() { $a = 5; $b = 10; $c = $a + $b; echo "$c\n"; return array('a' => $a, 'b' => $b, 'c' => $c); } } class b { function b1() { $a = a::a1(); echo $a['c']; } } b::b1(); Expected result: ---------------- 15 15 Actual result: -------------- 15 -- Edit bug report at http://bugs.php.net/?id=49165&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49165&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49165&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49165&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49165&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49165&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49165&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49165&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49165&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49165&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49165&r=support Expected behavior: http://bugs.php.net/fix.php?id=49165&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49165&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49165&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49165&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49165&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49165&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49165&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49165&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49165&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49165&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49165&r=mysqlcfg

« previous php.bugs (#140665) next »