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

Last change on this file since 31874 was 31874, checked in by brainslayer, 5 weeks ago

update php

File size: 268 bytes
Line 
1--TEST--
2instanceof self outside a class
3--FILE--
4<?php
5
6$fn = function() {
7    try {
8        new stdClass instanceof self;
9    } catch (Error $e) {
10        echo $e->getMessage(), "\n";
11    }
12};
13$fn();
14
15?>
16--EXPECT--
17Cannot access self:: when no class scope is active
Note: See TracBrowser for help on using the repository browser.