xref: /php-src/ext/opcache/tests/opt/sccp_027.phpt (revision e9f783fc)
1--TEST--
2SCCP 027: Support for ASSIGN_OBJ_REF
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.preload=
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12class Foo {
13    protected $arr;
14    public function init($a) {
15        $this->arr =& $a;
16        if (isset($a[0])) {
17            return 1;
18        } else {
19            return 2;
20        }
21    }
22}
23$x = new Foo();
24var_dump($x->init([1]));
25?>
26--EXPECT--
27int(1)
28