Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dinamic/8562246 to your computer and use it in GitHub Desktop.
Save dinamic/8562246 to your computer and use it in GitHub Desktop.
<?php
/**
* FinalKeywordIgnoredInTrait.php
*
* PHP 5.4.13 (cli) (built: Mar 15 2013 02:05:59)
* Copyright (c) 1997-2013 The PHP Group
* Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
* with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
*
* @link https://bugs.php.net/bug.php?id=62204
*/
trait ExampleTrait
{
final function execute()
{
}
}
class Example
{
use ExampleTrait;
// Should raise an \E_FATAL with the following message:
// "Cannot override final method Example::execute() in [...] on line 26"
function execute()
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment