Hi! > It would be good to have a section in UPGRADING.INTERNALS explaining > in details what should be done, very important for non core extensions > (pecl or other repositories).
Probably a good idea but I'm not sure what exactly to write there, besides "initialize everything, check everything" :) There are many places (esp. in SPL, but not only) where checks are present in some methods, but not others, or some values are checked while others do not, there are also places where some checks produce errors and some exceptions, sometimes even within one class. We don't need to clean that up right now but it's a good idea to keep in mind we need to. There's also a more tricky problem since many clone functions don't do the right thing too. E.g. this script: class MyPDO extends PDO { function __construct() {} } $pdo = new MyPDO(); $pdo2 = clone $pdo; $pdo2->query("123"); Produces a segfault, even though without clone it works fine. I wonder if one overrides __clone wouldn't more things break. I wrote a simple fuzzer to test classes, here: https://gist.github.com/smalyshev/f4d0c1502fa2411478ff Note: it runs random functions with random arguments, so don't run it anywhere it could hurt real data. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php