|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-12-07 18:58 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 23:00:01 2025 UTC |
Description: ------------ It appears that when 'or die' is used in combination with a return statement the return will always be 1, instead of returning the proper value and dying when not able to return the value. This appears to happen with any data type being returned. Reproduce code: --------------- function Sum($a, $b) { $c = $a + $b; return $c or die; } echo Sum(1,1); Expected result: ---------------- 6 Actual result: -------------- 1