#24921 [Opn->Fbk]: calling function with "Class Type Hints" arguments crashes PHP

From: Date: Tue, 05 Aug 2003 23:34:21 +0000
Subject: #24921 [Opn->Fbk]: calling function with "Class Type Hints" arguments crashes PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45427@lists.php.net to get a copy of this message
ID: 24921 Updated by: sniper@php.net Reported By: itotakas at msu dot edu -Status: Open +Status: Feedback Bug Type: Zend Engine 2 problem Operating System: Win 2000 Pro SP4 PHP Version: 5CVS-2003-08-02 (dev) New Comment: What do you mean with "PHP crush" ??? I guess you mean "crash", but why do you think it crashes? Previous Comments: ------------------------------------------------------------------------ [2003-08-03 06:20:07] itotakas at msu dot edu I tried php5-win32-200308031030, but still got same result(PHP crush). I wonder this problem is due to my platform ,, My platform is OS : Win 2000 Pro SP4 PHP : php5-win32-200308031030 Apache : 1.3.24 Mode : SAPI modules Hope this help ------------------------------------------------------------------------ [2003-08-03 05:30:10] sniper@php.net Output with latest CVS: Warning: Missing argument 1 for get() in /usr/src/web/php/php5/t.php on line 4 Fatal error: Argument 1 must be an instance of bug in /usr/src/web/php/php5/t.php on line 4 And no crash here. ------------------------------------------------------------------------ [2003-08-02 14:23:11] itotakas at msu dot edu Description: ------------ calling function with "Class Type Hints" arguments cause PHP crush Reproduce code: --------------- <? class bug { function get(bug $bug) { return $bug; } } $bug = new bug; // PHP should report the missing argument here $bug->get(); ?> Expected result: ---------------- showing error "missing argument" Actual result: -------------- PHP crush ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24921&edit=1

« previous php.bugs (#45427) next »