|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-24 19:20 UTC] marcot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 06:00:01 2025 UTC |
Description: ------------ When using the PHP 4 "forward compatibility" function overload() you can use function __get($n, $val) But when you want to use such class in PHP 5 it throws an error. Reproduce code: --------------- <?php error_reporting(E_ALL); class Foo { function __get($n, $val='') } if (function_exists('overload') && phpversion() < 5) { overload('Foo'); } ?> Expected result: ---------------- No errors Actual result: -------------- In PHP 5: Fatal error: Method Foo::__get() must take exactly 1 argument In PHP 4: Works as expected