> > Why I mean by: > Type HINTING is not type ENFORCEMENT. > is that: > function foo(int $a) {} > > foo(1); // OK > > foo("1"); // OK - the string is juggled to an int when the > function is called > // ENFORCEMENT would have (in some interpretations) > caused this to > // FAIL since the function argument was a string. >
I have not been following very closely this conversation so this might have been answered already: $b = '5'; function foo( int &$a ) { echo gettype( $a ); } foo( $b ); echo gettype( $b ); what is type of $b after the function call? -- Mikko Koppanen