public void Echo(PhpNumber value) { if (value.IsLong) Echo(value.Long); else Echo(value.Double); }
static int ProcessStatus(Context ctx, PhpValue status) { switch (status.TypeCode) { case PhpTypeCode.Alias: return ProcessStatus(ctx, status.Alias.Value); case PhpTypeCode.Long: return (int)status.ToLong(); default: ctx?.Echo(status); return 0; } }