|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-10-01 16:47 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2016-10-01 16:47 UTC] nikic@php.net
[2016-10-02 09:03 UTC] thekid@php.net
[2016-10-03 10:14 UTC] thekid@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 11:00:01 2025 UTC |
Description: ------------ There is a behavior change from PHP 7.0 -> PHP 7.1 with how finally blocks get executed Test script: --------------- <?php function test() { $r= []; try { $r[]= 'Try'; throw new Exception('Error'); } catch (Exception $e) { $r[]= 'Catch'; return $r; } finally { $r[]= 'Finally'; } } var_dump(test()); Expected result: ---------------- array(3) { [0]=> string(3) "Try" [1]=> string(5) "Catch" [2]=> string(7) "Finally" } Actual result: -------------- array(2) { [0]=> string(3) "Try" [1]=> string(5) "Catch" }