php-src/ext/tokenizer/tests/PhpToken_final_constructor.phpt
Nikita Popov 5a09b9fb0f Add PhpToken class
RFC: https://wiki.php.net/rfc/token_as_object

Relative to the RFC, this also adds a __toString() method,
as discussed on list.

Closes GH-5176.
2020-03-26 11:09:18 +01:00

15 lines
351 B
PHP

--TEST--
Check that the PhpToken constructor is final
--SKIPIF--
<?php if (!extension_loaded("tokenizer")) print "skip tokenizer extension not enabled"; ?>
--FILE--
<?php
class MyPhpToken extends PhpToken {
public function __construct() {
}
}
?>
--EXPECTF--
Fatal error: Cannot override final method PhpToken::__construct() in %s on line %d