php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73663 "Invalid opcode 65/16/8" occurs with a variable created with list();
Submitted: 2016-12-06 03:34 UTC Modified: -
From: naoki-kawamukai at cybozu dot co dot jp Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.1.0 OS: CentOS 7.2.1511
Private report: No CVE-ID: None
 [2016-12-06 03:34 UTC] naoki-kawamukai at cybozu dot co dot jp
Description:
------------
"Invalid opcode 65/16/8" occurs with a variable created with list().
print_r() has same error.
ref. https://3v4l.org/U3Qnl

This error occurs on PHP 7.0.13.
But it does not occur on PHP 5.6.28.

Test script:
---------------
<?php
var_dump(list($val) = [1]);    // OK

$array = [1];
var_dump(list($val) = $array); // NG: Invalid opcode

Expected result:
----------------
[vagrant@localhost ~]$ php test.php
/home/vagrant/test.php:2:
array(1) {
  [0] =>
  int(1)
}
/home/vagrant/test.php:5:
array(1) {
  [0] =>
  int(1)
}


Actual result:
--------------
[vagrant@localhost ~]$ php test.php
/home/vagrant/test.php:2:
array(1) {
  [0] =>
  int(1)
}
PHP Fatal error:  Invalid opcode 65/16/8. in /home/vagrant/test.php on line 5
PHP Stack trace:
PHP   1. {main}() /home/vagrant/test.php:0


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-06 09:33 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=358bd77b2360e31324b7d79fc1edf6d45499c68c
Log: Fixed bug #73663 (&quot;Invalid opcode 65/16/8&quot; occurs with a variable created with list())
 [2016-12-06 09:33 UTC] laruence@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC