Skip to content

Fix instance_to_array behavior on recursive classes  #701

@DrDet

Description

@DrDet

This code leads to SIGSEGV error with the following message "Error -1: Callstack overflow" now.

<?php

class A {
    /** @var A */
    public $this = null;

    public function __construct() {
        $this->this = $this;
    }
}

function demo() {
    $a = new A;
    var_dump(instance_to_array($a));
}

demo();

relates to KPHP-1530

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingruntimeFeature related to runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions