Bug #72436 [Opn]: PHP 5.6.11-1ubuntu3.4

From: Date: Thu, 16 Jun 2016 21:26:27 +0000
Subject: Bug #72436 [Opn]: PHP 5.6.11-1ubuntu3.4
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201685@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72436&edit=1 ID: 72436 User updated by: aydoganserdar at gmail dot com Reported by: aydoganserdar at gmail dot com Summary: PHP 5.6.11-1ubuntu3.4 Status: Open Type: Bug Package: Strings related Operating System: Ubuntu 15.04 PHP Version: 5.6.22 Block user comment: N Private report: N New Comment: test script fixes Error scenario: namespace app/aa use string; class A { public function B() { $c = $this->getC('getC'); $d = $this->getD('getD'); } private function getC(string $c) { return $c; } private function getD(string $d) { return $d; } } Worked if delete function "getC": class A { public function B() { //$c = $this->getC('getC'); $d = $this->getD('getD'); } /* private function getC(string $c) { return $c; }*/ private function getD(string $d) { return $d; } } Previous Comments: ------------------------------------------------------------------------ [2016-06-16 21:20:47] aydoganserdar at gmail dot com Description: ------------ variable type error. Error: PHP Catchable fatal error: Argument 1 passed to app/aa::A() must be an instance of string, string given, called in A.php on line 10 and defined in A.php on line 17 System Info: PHP 5.6.11-1ubuntu3.4 (cli) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans Test script: --------------- Error scenario: namespace app/aa use string; class A { public function B() { $c = $this->getC('getC'); $d = $this->getC('getD'); } private function getC(string $c) { return $c; } private function getD(string $d) { return $d; } } Worked if delete function "getC": class A { public function B() { $c = $this->getC('getC'); $d = $this->getC('getD'); } private function getC(string $c) { return $c; } private function getD(string $d) { return $d; } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72436&edit=1

« previous php.bugs (#201685) next »