Skip to content

Instantly share code, notes, and snippets.

@zetta
Created January 3, 2014 21:53
Show Gist options
  • Save zetta/8247351 to your computer and use it in GitHub Desktop.
Save zetta/8247351 to your computer and use it in GitHub Desktop.
php bug at loading classes as described here https://bugs.php.net/bug.php?id=46851
<?php
error_reporting(E_ALL | E_STRICT);
class b extends a
{
public function test($x, $y, $x, $foo)
{
}
}
class a
{
public function test($x, $y, $x)
{
}
}
$a = new a();
<?php
error_reporting(E_ALL | E_STRICT);
class a
{
protected function test($x, $y, $x)
{
}
}
class b extends a
{
public function test($x, $y, $x, $foo)
{
}
}
$a = new a();
@zetta
Copy link
Author

zetta commented Jan 3, 2014

PHP Strict standards: Declaration of b::test() should be compatible with that of a::test() in /tmp/php/bad.php on line 6
PHP Stack trace:
PHP 1. {main}() /tmp/php/bad.php:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment