|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66181 Assign a variable to a property then list
Submitted: 2013-11-26 19:01 UTC Modified: 2013-11-26 19:09 UTC
From: phil at philsturgeon dot co dot uk Assigned:
Status: Duplicate Package: Reproducible crash
PHP Version: 5.4.22 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
19 - 15 = ?
Subscribe to this entry?

 [2013-11-26 19:01 UTC] phil at philsturgeon dot co dot uk

When assigning a variable to a property and then using list() on the result of that I get a segfault with code 139 being the response. 

I ran this through 3v4l and it happens on everything over PHP 5.4.0.

Test script:

class Foo {
    protected $box;

    public function setBox(array $box)
        // Breaks FPM and gives a 502 due to connection reset by peers
        list($lat1, $lon1, $lat2, $lon2) = $this->box = $box;

        return $this;

$foo = new Foo;
$foo->setBox(explode(',', '40.688235,-74.013718,40.756427,-73.958770'));

echo "Success";

Expected result:

Actual result:
Process exited with code 139.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-26 19:03 UTC] phil at philsturgeon dot co dot uk
Here is the failing script running on 3v4l:

It is worth noting that when I split the assignment onto two lines and assign $box to $this->box first it works fine:
 [2013-11-26 19:09 UTC]
-Status: Open +Status: Duplicate
 [2013-11-26 19:09 UTC]
See bug #65969 Chain assignment failure
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 15:03:33 2021 UTC