1--TEST-- 2Weak scalar types, with references 3--FILE-- 4<?php 5 6// implicitly weak mode code 7 8function to_int(int &$x) {} 9function to_float(float &$x) {} 10function to_string(string &$x) {} 11function to_bool(bool &$x) {} 12 13$x = 1.0; 14var_dump($x); 15to_int($x); // because $x is by-reference, the weak type converts it 16var_dump($x); 17to_float($x); 18var_dump($x); 19to_string($x); 20var_dump($x); 21to_bool($x); 22var_dump($x); 23?> 24--EXPECT-- 25float(1) 26int(1) 27float(1) 28string(1) "1" 29bool(true) 30