note 73343 added to language.variables.scope

From: Date: Sun, 18 Feb 2007 21:27:19 +0000
Subject: note 73343 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-123559@lists.php.net to get a copy of this message
:'( <?php interface iBla{ public function nah(int $i); } class Bla implements iBla{ public function nah(int $i=1){ return $i; } } $a = new Bla(); echo $a->nah(); ?> Fatal error: Default value for parameters with a class type hint can only be NULL in /test.php on line 7 <?php interface iBla{ public function nah(int $i=1); } class Bla implements iBla{ public function nah(int $i=1){ return $i; } } $a = new Bla(); echo $a->nah(); ?> Fatal error: Default value for parameters with a class type hint can only be NULL in /test.php on line 4 ---- Server IP: 64.71.164.2 Probable Submitter: 80.250.112.17 ---- Manual Page -- http://www.php.net/manual/en/language.variables.scope.php Edit -- https://master.php.net/note/edit/73343 Del: integrated -- https://master.php.net/note/delete/73343/integrated Del: useless -- https://master.php.net/note/delete/73343/useless Del: bad code -- https://master.php.net/note/delete/73343/bad+code Del: spam -- https://master.php.net/note/delete/73343/spam Del: non-english -- https://master.php.net/note/delete/73343/non-english Del: in docs -- https://master.php.net/note/delete/73343/in+docs Del: other reasons-- https://master.php.net/note/delete/73343 Reject -- https://master.php.net/note/reject/73343 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123559) next »