1--TEST-- 2Test fprintf() function (errors) 3--FILE-- 4<?php 5 6/* Testing Error Conditions */ 7echo "*** Testing Error Conditions ***\n"; 8 9/* zero argument */ 10try { 11 var_dump( fprintf() ); 12} catch (TypeError $e) { 13 echo $e->getMessage(), "\n"; 14} 15 16/* scalar argument */ 17try { 18 var_dump( fprintf(3) ); 19} catch (TypeError $e) { 20 echo $e->getMessage(), "\n"; 21} 22 23/* NULL argument */ 24try { 25 var_dump( fprintf(NULL) ); 26} catch (TypeError $e) { 27 echo $e->getMessage(), "\n"; 28} 29 30echo "Done\n"; 31?> 32--EXPECT-- 33*** Testing Error Conditions *** 34fprintf() expects at least 2 arguments, 0 given 35fprintf() expects at least 2 arguments, 1 given 36fprintf() expects at least 2 arguments, 1 given 37Done 38