variant_fix

(PHP 5, PHP 7)

variant_fixReturns the integer portion of a variant

˵��

variant_fix ( mixed $variant ) : mixed

Gets the integer portion of a variant.

����

variant

The variant.

Note:

�������б������㺯�����������IJ��������� PHP ���õ����ͣ��������ַ������������������ͻ��� NULL����������һ�� COM��VARIANT ���� DOTNET ���ʵ����PHP �������ͽ���ʹ�ú͹���VARIANT����ͬ�Ĺ���ת���ɱ�����COM �� DOTNET �����ֵ����ȡ��Ĭ�����Բ������ɱ���ֵʹ�á�

�������㺯����ͬ�������� COM ���е�������йش��ຯ���ĸ�����Ϣ�μ� MSDN �⡣PHP ���������������������� PHP �е� variant_add() ��Ӧ�� MSDN �ĵ��е� VarAdd()��

����ֵ

If variant is negative, then the first negative integer greater than or equal to the variant is returned, otherwise returns the integer portion of the value of variant.

ע��

Warning

This documentation is based on the MSDN documentation; it appears that this function is either the same as variant_int(), or that there is an error in the MSDN documentation.

�μ�

  • variant_int() - Returns the integer portion of a variant
  • variant_round() - Rounds a variant to the specified number of decimal places
  • floor() - ��ȥ��ȡ��
  • ceil() - ��һ��ȡ��
  • round() - �Ը�����������������