Bug #70207 [NEW]: Finally breaks with opcache

From: Date: Fri, 07 Aug 2015 15:55:50 +0000
Subject: Bug #70207 [NEW]: Finally breaks with opcache
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195004@lists.php.net to get a copy of this message
From:             james dot h dot cracknell at gmail dot com
Operating system: Windows Server 2008R2
PHP version:      7.0.0beta3
Package:          opcache
Bug Type:         Bug
Bug description:Finally breaks with opcache

Description:
------------
I am seeing some very unusual results using opcache with a try block
returning the result of a method call with a finally block containing
@.

    <?php
    
    function bar() { return 'bar'; }

    function foo() {
      try { return bar(); }
      finally { @fclose(null); }
    }

    var_dump(foo());

opcache, @:
===========
int(22527)

!opcache, @:
============
string(3) "bar"

opcache, !@:
============
Warning: fclose() expects parameter 1 to be resource, null given
bool(false)

!opcache, !@:
=============
Warning: fclose() expects parameter 1 to be resource, null given
string(3) "bar"


-- 
Edit bug report at https://bugs.php.net/bug.php?id=70207&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=70207&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=70207&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=70207&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=70207&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=70207&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=70207&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=70207&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=70207&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=70207&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=70207&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=70207&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=70207&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=70207&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70207&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=70207&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=70207&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=70207&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70207&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=70207&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=70207&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#195004) next »