xref: /PHP-8.1/Zend/tests/objects_026.phpt (revision f8d79582)
1--TEST--
2Using $this when out of context
3--FILE--
4<?php
5
6try {
7    $this->a = 1;
8} catch (Exception $e) {
9}
10
11?>
12--EXPECTF--
13Fatal error: Uncaught Error: Using $this when not in object context in %s:%d
14Stack trace:
15#0 {main}
16  thrown in %s on line %d
17