PHP :: Bug #73871 :: Strange opcache behavior
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73871 Strange opcache behavior
Submitted: 2017-01-05 11:42 UTC Modified: 2017-01-06 22:15 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:2 (66.7%)
From: xstreid at gmail dot com Assigned:
Status: Duplicate Package: opcache
PHP Version: 7.1.0 OS: Ubuntu 16.04\Debian 8 (64bit)
Private report: No CVE-ID: None
 [2017-01-05 11:42 UTC] xstreid at gmail dot com
Description:
------------
Hello everyone! This bug reproduced only on PHP 7.1.0 with enabled Opcache (PHP 5.6 and PHP 7.0 not affected).
See test script. (Run twice or more for reproduce. First run begin not from cache and the script will work correctly).

Test script:
---------------
<?php
class Test {
	public function didIt() {
		$v = 2;
		$v = array($v);
		var_dump($v);
	}
}
(new Test())->didIt(); // RETURN array(1) { [0]=> array(1) { [0]=> *RECURSION* } }

$testFunction = function () {
	$v = 2;
	$v = array($v);
	var_dump($v);
};
$testFunction(); // RETURN array(1) { [0]=> array(1) { [0]=> *RECURSION* } }

$v = 2;
$v = array($v);
var_dump($v); // RETURN array(1) { [0]=> int(2) } 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-06 22:06 UTC] pagescene at gmail dot com
There is indeed some issue with opcache under PHP 7.1. Drupal's 7 Webform module (stable release) works perfectly on all previous PHP releases (5.4, 5.6 7.0), with opcache enabled. However, this module (and thus the whole CMS) fails under PHP 7.1 with opcache enabled. There is no error message, site simply return no response and Nginx returns 502.
 [2017-01-06 22:15 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2017-01-06 22:15 UTC] nikic@php.net
Duplicate of bug #73847, which will be fixed in PHP 7.1.1.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Aug 20 16:01:25 2018 UTC