source: src/router/php7/Zend/tests/this_in_isset.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 606 bytes
Line 
1--TEST--
2$this in isset
3--FILE--
4<?php
5var_dump(isset($this));
6try {
7        var_dump(isset($this->foo));
8} catch (Throwable $e) {
9        echo "exception\n";
10}
11try {
12        var_dump(isset($this->foo->bar));
13} catch (Throwable $e) {
14        echo "exception\n";
15}
16try {
17        var_dump(isset($this[0]));
18} catch (Throwable $e) {
19        echo "exception\n";
20}
21
22class A extends ArrayObject {
23        public $foo = 5;
24        function foo() {
25                $this[0] = 5;
26                var_dump(isset($this));
27                var_dump(isset($this->foo));
28                var_dump(isset($this[0]));
29        }
30}
31$a = new A();
32$a->foo();
33?>
34--EXPECT--
35bool(false)
36exception
37exception
38exception
39bool(true)
40bool(true)
41bool(true)
Note: See TracBrowser for help on using the repository browser.